How to find OS version in Ubuntu Linux

I got a new Ubuntu server running on AWS. How do I check the version of Ubuntu I am running from the CLI?

Introduction: If you installed version of Ubuntu on Cloud based system, but if you do not know what version exactly it is. Here is how to find out your Ubuntu Linux version from the CLI. There are various ways to check which version of Ubuntu you are running. You can either check from within GUI, or put in a short command line in the bash shell Terminal.

How to find OS version in Ubuntu Linux

Command to find the version of Ubuntu that is installed on your server:

  1. Open the terminal application
  2. Another option is to log in to the remote Ubuntu server using the ssh command
  3. Type lsb_release -a to see OS version in Ubuntu Linux

Let see all commands in details.

How to check the version of Ubuntu Linux

The lsb_release command provides LSB (Linux Standard Base) and distribution-specific information on the CLI. The syntax is:
$ lsb_release -a
Sample outputs:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic

So I am using Ubuntu Linux version 18.04.1 LTS codenamed “bionic”.

Use hostnamectl command to find Ubuntu OS version

Another option is to run the following hostnamectl command that cControl the system hostname. It also displays operating system info. Just run the following command:
$ hostnamectl

   Static hostname:
         Icon name: computer-laptop
           Chassis: laptop
        Machine ID: 5676e0534ca04d58a94e207dd7617dc3
           Boot ID: 4b33025d11fa4b2fa932d735961412fd
  Operating System: Ubuntu 18.04.1 LTS
            Kernel: Linux 4.19.2
      Architecture: x86-64

Checking your Ubuntu Version using GUI

Open System Settings by pressing the Super key on your keyboard and type “settings”. Click on Details. You will see version below Ubuntu Logo:

How to check Ubuntu version in the Terminal

The following method will work no matter which version of Ubuntu or desktop environment or cloud sever you are using. Open the Terminal (type keyboard shortcut: Ctrl+Alt+T). Type any one of the following commands:
$ lsb_release -a
$ hostnamectl
$ cat /etc/*release

The last one use the cat command to display /etc/lsb-release and /etc/os-release files on screen.


You learned how to check OS version in Ubuntu Linux using both GUI and CLI (command line interface) methods.

Posted by: SXI ADMIN

The author is the creator of SXI LLC and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

How to Make Website WCAG Compliant?

Next Post

Link download Kali Linux 2020.1 (ISO + Torrent)

Related Posts