LinuxTutorialsUbuntu

How To Check Ubuntu Version

Check Ubuntu Version

In this tutorial, we will show you how to check the Ubuntu version from the command line. As a system administrator, the first question you should ask yourself after getting a new Ubuntu server to manage is what version of Ubuntu am I running? The version of the operating system in use on our server is important as it is critical that we have all the latest updates to ensure that the server is secure. There are a few ways to check your VPS hosting is using what version of Ubuntu. With the commands below you can choose one of them to find out which Ubuntu version is running on your system.

This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘sudo‘ to the commands to get root privileges. I will show you through the step-by-step check Ubuntu version.

Prerequisites

  • A server running one of the following operating systems: Ubuntu 20.04, 18.04, 16.04, and any other Debian-based distribution like Linux Mint.
  • It’s recommended that you use a fresh OS install to prevent any potential issues.
  • A non-root sudo user or access to the root user. We recommend acting as a non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.

Check Ubuntu Version

There are several ways on how to check what version of Ubuntu is running on your system. Below you can find multiple examples on how to determine the Ubuntu version.

The first place to look for the Ubuntu version is to look inside /etc/issue the file. From terminal run command:

$ cat /etc/issue
Ubuntu Focal Fossa \n \l

To obtain a Ubuntu release number check content of /etc/lsb-release file:

$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu Xenial Xerus

Additional information regarding the Ubuntu version can be found within /etc/os-release:

$ cat /etc/os-release 
NAME="Ubuntu"
VERSION="20.04 (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04"
VERSION_ID="20.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=Focal Fossa

Furthermore, the following command will provide you with a neat output of your current Ubuntu version:

$ lsb_release -da
No LSB modules are available.
Distributor ID:    Ubuntu
Description:    Ubuntu Xenial Xerus (development branch)
Release:    20.04
Codename:   Focal Fossa

For more information on Ubuntu, releases visit the Ubuntu Releases page.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

Save

r00t

r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to idroot.us, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button