SysAdmin Data

How to Check Ubuntu Version in Command Line

What version of Ubuntu Linux are you using? How to check the Ubuntu version from the command line?

In Ubuntu Linux, you can check the Ubuntu version from the command line using the lsb_release command.

To check the Ubuntu version, open the command line and Type:

lsb_release -a

You will get output something similar to the following:

Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.2 LTS
Release:	20.04
Codename:	focal

As you can see I am using Ubuntu 20.04 LTS focal.

The /etc/issue files also contain the Ubuntu version:

cat /etc/issue
Ubuntu 20.04.2 LTS \n \l

Check Ubuntu Kernel Version

The lsb_release does not show the kernel version. To get the kernel version in Ubuntu, use the uname command.