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.

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 3 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersdf ncdu pydf
File Managementcat cp mkdir tree
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
3 comments… add one
  • Jil Mar 12, 2013 @ 11:42

    I google “How do I check the version of Ubuntu I am running?” and I found this page. Was very useful to me. Thanks you dear. God bless you.

    • Root Fan Boi May 1, 2014 @ 17:33

      To find the version of Ubuntu that is installed on server, I always used
      cat /etc/issue
      cat /proc/version
      uname -a

  • Alexandra Aug 16, 2016 @ 1:01

    Ubuntu show version number command I like on my companies Linode server:

    lsb_release -a

    I work as a web dev. By knowing version I know what version of PHP it runs.

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum