Eagerly waiting to update Ubuntu from 16.04 to 18.04 via command line? Here’s how we do it.
Here at Bobcares, we have seen several such Ubuntu related queries as part of our Server Management Services for web hosts and online service providers.
Today we’ll take a look at how to upgrade the Ubuntu version
What’s new in Ubuntu 18.04
Here are the different features that are available in the Ubuntu version 18.04.
- The Linux kernel 4.5 now includes better features like AMD secure memory encryption support, CPU controller for the cgroup v2 interface, the latest MD driver with software RAID enhancements, and improved power management for systems.
- The new kernel also includes some Ubuntu-specific updates, Linux security module stacking support, and the signing of POWER host and NV kernels is now supported.
- Welcome screen and improved help pages
- It installs Python 3.6
- Apache updates to version 2.4.29 and supports HTTP/2.
- Nginx updates to version 1.14.0.
- PHP updates from version 7.1 to 7.2.
- 32-bit PowerPC support is dropped.
- Easier live patching.
A few known issues of Ubuntu 18.04
- In the partitioning step, you will be allowed to configure LVM across multiple devices without you to create a separate boot partition. This might lead to the bootloader installation to fail or cause failures to boot.
- With the new Ubiquity installer, importing SSH keys for GitHub or Launchpad won’t work.
- Removal of the LVM group is not possible if volume groups of the same name are found during installation. So make sure to format the drives before installing.
How to update Ubuntu from 16.04 to 18.04 command line
Below is the procedure our Support Engineers follow to update the Ubuntu version.
1. The first step is to create a backup of your environment.
2. The next step is to upgrade all the already installed packages of current Ubuntu version 16.04. For that, we run the command
$ sudo apt-get update && sudo apt-get upgrade
You will be asked for the confirmation of the upgrade. Enter Y to continue.
You can reboot the Linux if the kernel updates.
$ sudo reboot
3. Run the below command to install the Update Manager in your server.
$ sudo apt install update-manager-core
4. Upgrading Ubuntu
Now we upgrade Ubuntu by running the command:
$ sudo do-release-upgrade
As a result, of the above command, you will be asked for the confirmation of upgrade via SSH. Enter Y and hit enter.
The installation will take some time to complete. In between the installation, you will see some prompts that will require your interaction so make sure you are available to respond to those prompts.
Once the upgrade completes, a restart is required.
During the restart, you will be logged out. Make sure to login back and check the ubuntu version by running the below command.
$ uname -r
Also, ensure that the necessary ports are open using ss or netstat command as shown below.
$ sudo ss -tulpn
$ sudo netstat -tulpn
You can make use of grep/egrep command or tail/cat command to verify the error logs.
$ dmesg
$ tail -f /path/to/log/files
Finally, remove the TCP port 1022 via ufw.
$ sudo ufw delete allow 1022/tcp
How to tackle the Ubuntu 16.04 to 18.04 update errors
To update Ubuntu from 16.04 to 18.04, we used the below command,
$ do-release-upgrade
Using this method, we came across a known bug which doesn’t allow to continue with the upgrade. Instead, it threw the below error.
In case, if you come across this error message, then run the below commands to fix this error.
$ sudo apt-get update
$ sudo apt-get upgrade -y
$ sudo apt-get dist-upgrade
$ sudo do-release-upgrade
After running the above commands, continue with the Ubuntu upgrade process.
[Need any further assistance in fixing Ubuntu errors? – We are here to help you.]
Conclusion
In today’s witeup, we saw how our Support Engineers upgrade the Ubuntu version.
Hello and best regards, my Ubuntu 16.04 LTS updated to 18.04 helped the last description for which thank you very much. But now I have a problem because webmin was installed on the server and it does not work, you can help, I will be very grateful
Hi,
Our Experts can help you with the issue, we’ll be happy to talk to you on chat (click on the icon at right-bottom).