• Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate
TecNStuff
Menu
  • Home
  • Linux
  • Ubuntu
  • Debian
  • CentOS
  • Linux Commands
  • About Us
  • Donate

How to Check Ubuntu Version with Different Methods

Written by Admin, Updated On May 7, 2019
terminal, ubuntu
Check Ubuntu Version

Ubuntu releasing new version at every six months and LTS (Long Term Support) releasing at every two years. It is best practice to check the Ubuntu version before you use it. In this tutorial, we have described how to check version with different methods. You can check using command line as well from the graphical interface.

Check Ubuntu Version using Command Line#

It is good practice to check version using command line as it is not depend on anything. So here we are going to check Ubuntu version using lsb_release (Linux Standard Base) utility. Generally, this method is best because it will work regardless of any desktop environment or version you are using.

lsb_release -a

It will show output as below:

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

From the above output you can see that Description line is showing OS version.

Instead of print all the details of your Ubuntu system, you can simply print only distribution name by passing -d with command:

lsb_release -d

The output should be similar like below:

Output
Description: Ubuntu 18.04.2 LTS

Check Ubuntu Version using /etc/os-release file#

You also can check version using os-release file. It contains identification data of operating system and this available only with newer Ubuntu distribution. This method will work only if you have Ubuntu 16.04 or newer.

cat /etc/os-release

The output will be similar as below:

Output
NAME="Ubuntu"
VERSION="18.04.2 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.2 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic

Check Ubuntu Version using /etc/issue file#

Like, os-release the /etc/issue file also contains the system identification text. Using below command you can see it:

cat /etc/issue

It will show output as following:

Output
Ubuntu 18.04.2 LTS \n \l

Check Ubuntu Version using hostnamectl command#

Mostly, hostnamectl command is used to set hostname in Ubuntu systems but you also can check the system details using it. Execute below command:

hostnamectl

This command will work only for Ubuntu 16.04 and newer versions. It should show output as below:

Output
Static hostname: local.tecnstuff
Icon name: computer-laptop
Chassis: laptop
Machine ID: 39bb66809520461594c31b34a4829d7b
Boot ID: 5b6b4bc9e7584e4ba62313eeaab9dd61
Operating System: Ubuntu 18.04.2 LTS
Kernel: Linux 4.15.0-46-generic
Architecture: x86-64

Check Ubuntu Version in the Gnome Desktop#

With Ubuntu 18.04 LTS the default desktop environment is Gnome but the previous version was using Unity desktop environment.

Follow the below steps below to check version if you are using Gnome.

At first, open the system settings window and click on the Settings icon as shown in the image below:

Ubuntu settings window

Now click on Details tab under system settings window.

Ubuntu Version

You can see your Ubuntu version under the Ubuntu logo.

Like this, you can get your OS version using any one of these method.

Conclusion#

Finally, you successfully learned how to check OS version using different methods. You can get more information of Ubuntu releases at official site of the Ubuntu Releases.

If you are using Ubuntu 16.04 then you can Upgrade using this tutorial Upgrade Ubuntu 16.04 to Ubuntu 18.04 LTS

If you have any question or suggestion don’t forget to comment below.

If our content helps you, please consider buying us a coffee

Thank you for your support.

Share On
Share on Facebook
Share on Twitter
Share on Reddit
Share on Tumblr
 Previous Article Remove Files and Directories Using Linux Command Line
Next Article   How to Install LAMP Stack on CentOS 7

Related Posts

  • How to Install Apache, MySQL, PHP (LAMP) on Ubuntu 22.04

    How to Install LAMP on Ubuntu 22.04

    March 20, 2023
  • How to Install LEMP Stack on Ubuntu 22.04

    How to Install LEMP Stack on Ubuntu 22.04

    March 18, 2023
  • How to Install Memcached on Ubuntu 22.04

    How to Install Memcached on Ubuntu 22.04

    March 16, 2023

Leave a Reply Cancel reply

DigitalOcean Referral Badge

Popular Posts

  • How to Install Microsoft Edge Browser on Ubuntu 22.04
    How to Install Microsoft Edge Browser on Ubuntu 22.04 March 14, 2023
  • How to Install Ruby on Ubuntu 22.04 LTS
    How to Install Ruby on Ubuntu 22.04 LTS February 27, 2023
  • How to Install LEMP Stack on Ubuntu 22.04
    How to Install LEMP Stack on Ubuntu 22.04 March 18, 2023
  • How to Install Set Up Apache Virtual Hosts on Ubuntu 22.04
    How to Set Up Apache Virtual Hosts on Ubuntu 22.04 March 2, 2023
  • How to Install MariaDB on Debian 11 Bullseye
    How to Install MariaDB on Debian 11 Bullseye March 8, 2023
© 2020 TecNStuff All rights reserved. This website is using and storing cookies on your browser. By using this website you agree our Privacy Policy.  Follow us -  Twitter | Facebook