Overview
システム全体のアップデートを行います。
前提条件
システムアップデート
APT は update コマンドでリポジトリの情報を最新化し、upgrade は update の情報をベースに実際のパッケージ更新を行います。このため update, upgrade は基本的にセットです。
myadmin@ubuntu:~$ sudo apt update
myadmin@ubuntu:~$ sudo DEBIAN_FRONTEND=noninteractive apt -y -o Dpkg::Options::=--force-confdef -o Dpkg::Options::=--force-confold upgrade --with-new-pkgs
Ubuntu は needrestart がデフォルトで稼働しています。例として前述のオプションを除いて sudo apt-get upgrade とすると、カーネル更新時に下記の TUI を表示して入力待ちの状態となります。詳細はこちらを参照して下さい。
Newer kernel available
The currently running kernel version is 5.15.0-25-generic which is not the expected kernel version 5.15.0-27-generic.
Restarting the system to load the new kernel will not be handled automatically, so you should consider rebooting.
Ubuntu 22.04 apt update, apt upgrage 手動システムアップデート