Student lesson 42 assignment: How do you upgrade Ubuntu servers?
Canonical, Ubuntu parent company regularly releases upgrades for Ubuntu. I think it’s every 9 months. Was every 6 months before, but now it’s nine.
Long term support (LTS) releases are done every 5 years, I think. You can find more information on these releases from this page.
So, if you install a new release of Ubuntu today, within the next 9 months, there should be upgrades waiting to be installed.
This brief tutorial shows you how to easily upgrade to the latest version of Ubuntu when it gets released.
Upgrading Ubuntu Servers over the Internet
There are many ways to upgrade Ubuntu. One way is to get the latest ISO image on CD/DVD and do an in-place upgrade of the server.
Another way is to upgrade the server directly over the Internet, although this method requires high speed Internet connection.
To check Ubuntu current version you’re running, open the terminal and run the commands below:
You’ll see something similar to the one below after running the above command. It shows you Ubuntu distribution ID, description, release and codename.
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.1 LTS Release: 16.04 Codename: xenial
When you’re ready to upgrade your server, run the commands below to prepare your server for upgrade.
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt-get autoremove
Running the above commands tell Ubuntu to fetch for latest version of all the packages installed on the system and if any are found, to download and install them. The commands also remove absolute packages.
28 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 164 MB of archives. After this operation, 295 MB of additional disk space will be used. Do you want to continue? [Y/n] y
After running the command above and installing all the updated packages, you may want to reboot your computer. When rebooted, run the commands below to install Ubuntu upgrade tool.
sudo apt-get install update-manager-core
This tool is probably already installed.
Next, run the commands below to start downloading newer packages for your system. This may take a while depending on the speed of your Internet connection.
sudo do-release-upgrade -d
Now all you have to do is type y for yes and wait. Ubuntu will fetch newer packages, install them and get your system onto the latest version.
That’s it! You may also like the post below: