In this tutorial, we want to teach you to Check and Install Security Updates on Ubuntu 22.04.
Linux’s security updates are packages and system component updates that patch a security hole or improve the robustness of the system. Some of those updates are quite critical and should be applied almost immediately to protect your server from severe vulnerabilities such as the recently discovered Log4J exploit.
Steps To Check and Install Security Updates on Ubuntu 22.04
To complete this guide, you must log in to your server as a root or non-root user with sudo privileges and follow the steps below. To do this, you can follow our guide on Initial Server Setup with Ubuntu 22.04.
Check Security Status on Ubuntu 22.04
To get the status of installed packages on Ubuntu, you can use the following command:
Output 617 packages installed, of which: 613 receive package updates with LTS until 4/2027 This machine is not attached to an Ubuntu Advantage subscription. See https://ubuntu.com/advantage
Install Update Packages on Ubuntu 22.04
At this point, you can update all the packages to install newly released updates. To do this, run the command below:
Output ... Reading package lists... Done Building dependency tree... Done Reading state information... Done 164 packages can be upgraded. Run 'apt list --upgradable' to see them.
Find Upgradeable packages on Ubuntu 22.04
Now you can use the command below to see the upgradeable packages:
apt list --upgradable
Output Listing... Done apparmor/jammy-updates 3.0.4-2ubuntu2.2 amd64 [upgradable from: 3.0.4-2ubuntu2.1] apport/jammy-updates,jammy-security 2.20.11-0ubuntu82.4 all [upgradable from: 2.20.11-0ubuntu82.1] apt-utils/jammy-updates 2.4.9 amd64 [upgradable from: 2.4.6] apt/jammy-updates 2.4.9 amd64 [upgradable from: 2.4.6] base-files/jammy-updates 12ubuntu4.3 amd64 [upgradable from: 12ubuntu4.2] bind9-dnsutils/jammy-updates 1:9.18.12-0ubuntu0.22.04.1 amd64 [upgradable from: 1:9.18.1-1ubuntu1.1] bind9-host/jammy-updates 1:9.18.12-0ubuntu0.22.04.1 amd64 [upgradable from: 1:9.18.1-1ubuntu1.1] bind9-libs/jammy-updates 1:9.18.12-0ubuntu0.22.04.1 amd64 [upgradable from: 1:9.18.1-1ubuntu1.1] binutils-common/jammy-updates,jammy-security 2.38-4ubuntu2.1 amd64 [upgradable from: 2.38-3ubuntu1] binutils-x86-64-linux-gnu/jammy-updates,jammy-security 2.38-4ubuntu2.1 amd64 [upgradable from: 2.38-3ubuntu1] binutils/jammy-updates,jammy-security 2.38-4ubuntu2.1 amd64 [upgradable from: 2.38-3ubuntu1] ca-certificates/jammy-updates,jammy-security 20211016ubuntu0.22.04.1 all [upgradable from: 20211016] cloud-init/jammy-updates,jammy-security 23.1.2-0ubuntu0~22.04.1 all [upgradable from: 22.2-0ubuntu1~22.04.3] cryptsetup-bin/jammy-updates 2:2.4.3-1ubuntu1.1 amd64 [upgradable from: 2:2.4.3-1ubuntu1] cryptsetup-initramfs/jammy-updates 2:2.4.3-1ubuntu1.1 all [upgradable from: 2:2.4.3-1ubuntu1] cryptsetup/jammy-updates 2:2.4.3-1ubuntu1.1 amd64 [upgradable from: 2:2.4.3-1ubuntu1] ...
Upgrade Packages on Ubuntu 22.04
At this point, you can easily run the following command to install all upgradeable packages on Ubuntu 22.04:
apt upgrade -y
Upgrade Ubuntu 22.04 Kernel
Also, you can run the command below to upgrade the Ubuntu kernel:
apt full-upgrade -y
Upgrade Kept back packages on Ubuntu 22.04
Kept back means that there are new versions of these packages that will not be installed for some reason. Possible reasons are broken dependencies or new dependencies.
To upgrade all the “kept back” packages, run the command:
apt dist-upgrade -y
At this point, you have learned to Check and Install Security Updates on Ubuntu 22.04.
Hope you enjoy it. You may be like these articles:
Set up Bitwarden on Ubuntu 22.04
Install and Configure Prometheus on Ubuntu 22.04