セキュリティアップデートのコマンド忘れがちなので備忘録としてメモ
ログイン時の以下のような表示が出たら、実行する。
Welcome to Ubuntu 16.04.6 LTS (GNU/Linux 4.4.0-1083-aws x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
77 packages can be updated.
2 updates are security updates.
New release '18.04.6 LTS' available.
Run 'do-release-upgrade' to upgrade to it.
の
77 packages can be updated.
2 updates are security updates.
コマンド
特に何も気にせずにアップデートするなら以下のコマンドを実行。
sudo apt upgrade -y
sudo apt-get update -y
sudo apt-get install -y unattended-upgrades
sudo unattended-upgrades
パッケージとかアップデートされたら困りそうな方は、公式ページより調べて、適宜必要なものをアップデートしてください。
再ログイン
Welcome to Ubuntu 16.04.7 LTS (GNU/Linux 4.4.0-1083-aws x86_64)
* Documentation: https://help.ubuntu.com
* Management: https://landscape.canonical.com
* Support: https://ubuntu.com/advantage
0 updates can be applied immediately.
Ubuntu comes with ABSOLUTELY NO WARRANTY, to the extent permitted by
applicable law.
適用するアップデートが0になったのでOK
0 updates can be applied immediately.
何も考えずに昔に作ったイメージなどから起動した場合、セキュリティアップデートが適用されていなかったりすると思います。
2021年1月27日には「sudoの脆弱性」も出ていたりします。
参考:
■sudoの脆弱性(CVE-2021-3156)に関する注意喚起
https://www.jpcert.or.jp/at/2021/at210005.html
独自に作成しているAMIなども、セキュリティアップデートは定期的に更新していきましょう。
P.S.
というか、そろそろUbuntu20.04にしようかな。