First, check the current version of your machine.
[email protected]:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=21.04 DISTRIB_CODENAME=hirsute DISTRIB_DESCRIPTION="Ubuntu 21.04" [email protected]:~#
Then, Check that your system is up to date by running the following commands.
apt update && sudo apt upgrade -y
NOTE: While running the command it'll prompt for several permissions give the permissions as required and Enter.
Restarting services... systemctl restart multipathd.service packagekit.service udisks2.service Service restarts being deferred: /etc/needrestart/restart.d/dbus.service systemctl restart systemd-logind.service systemctl restart unattended-upgrades.service No containers need to be restarted. User sessions running outdated binaries: root @ session #1: apt, bash, sshd root @ user manager service: systemd [email protected]:~#
And reboot the server,
Once all updates are installed and rebooting server, Then install the update-manager-core package if it is not already installed.
apt-get install update-manager-core
[email protected]:~# apt-get install update-manager-core Reading package lists... Done Building dependency tree... Done Reading state information... Done update-manager-core is already the newest version (1:21.04.10). update-manager-core set to manually installed. The following packages were automatically installed and are no longer required: eatmydata libeatmydata1 net-tools python3-certifi python3-importlib-metadata python3-jinja2 python3-json-pointer python3-jsonpatch python3-jsonschema python3-markupsafe python3-more-itertools python3-pyrsistent python3-requests python3-urllib3 python3-zipp Use 'apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. [email protected]:~#
Go to the last line of /etc/update-manager/release-upgrades configuration file is set to ‘lts' if you only want LTS upgrades or to 'normal' if you want non-LTS upgrades.
# Default behavior for the release upgrader. [DEFAULT] # Default prompting and upgrade behavior, valid options: # # never - Never check for, or allow upgrading to, a new release. # normal - Check to see if a new release is available. If more than one new # release is found, the release upgrader will attempt to upgrade to # the supported release that immediately succeeds the # currently-running release. # lts - Check to see if a new LTS release is available. The upgrader # will attempt to upgrade to the first LTS release available after # the currently-running one. Note that if this option is used and # the currently-running release is not itself an LTS release the # upgrader will assume prompt was meant to be normal. Prompt=normal
Now launch the upgrade tool by running the following command.
NOTE: While running the command it'll prompt for several permissions.
Press y to confirm the upgrade.
After a restart, login and check the current Ubuntu version on your server by running the following command.
[email protected]:~# cat /etc/lsb-release DISTRIB_ID=Ubuntu DISTRIB_RELEASE=21.10 DISTRIB_CODENAME=impish DISTRIB_DESCRIPTION="Ubuntu 21.10" [email protected]:~#