How To 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 commands below you can choose one of them to find out which Ubuntu version is running on your system.
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 Ubuntu version.

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

### cat /etc/issue
Ubuntu Xenial Xerus \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 Ubuntu version can be found within /etc/os-release:

### cat /etc/os-release 
NAME="Ubuntu"
VERSION="16.04 (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
UBUNTU_CODENAME=xenial

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:    16.04
Codename:   xenial

Leave a Reply