How to Check Ubuntu Version

How to Check the Ubuntu Version

Ubuntu, a popular Linux distribution, undergoes regular updates and releases. Knowing the version of Ubuntu you’re running can be crucial for various reasons, such as software compatibility, troubleshooting, or when seeking support.

In this guide, we will walk you through the steps to check the version of Ubuntu installed on your system. By the end of this tutorial, you’ll be able to determine not only the version number but also the codename and release date of your Ubuntu installation.

Checking the version on your system can be done using the terminal. Follow these simple steps to check the Ubuntu version:

Open the Terminal

Open the terminal by pressing Ctrl + Alt + T or by searching for “terminal” in the application menu.

Check Ubuntu Version:

Using the “lsb_release” Command

Enter the following command in the terminal:

lsb_release -a

This command stands for “Linux Standard Base” and provides information about the Linux distribution. It will display detailed information about your Ubuntu version, including the distribution, release number, and codename. The output should look similar to this:

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

From the above output, you can determine that the Ubuntu version is “18.04.6 LTS” and the codename for this release is “bionic”.

See also  How to Turn Off or Disable Output Buffering for php.ini on PHP 5.3.2

Alternatively, you can use the following command to display only the Ubuntu release number:

lsb_release -r

The output will be similar to this:

Release:	18.04

Using the “/etc/os-release” File

Type the following command:

cat /etc/os-release

The output will display various details about your Ubuntu system, including the version. Look for the lines starting with PRETTY_NAME or VERSION.

root@geeks:~# cat /etc/os-release
VERSION="18.04.6 LTS (Bionic Beaver)"
PRETTY_NAME="Ubuntu 18.04.6 LTS"

Using the “/etc/lsb-release” File

Enter the Command:

cat /etc/lsb-release

This file specifically contains information about the Ubuntu version. Look for the line starting with DISTRIB_DESCRIPTION.

root@geeks:~# cat /etc/lsb-release

Using the “hostnamectl” Command

Enter the Command:


This command provides information about the system’s hostname and other related details, including the Operating System. Look for the line starting with Operating System.

root@geeks:~# hostnamectl
   Static hostname:
         Icon name: computer-vm
           Chassis: vm
        Machine ID: c9bfbfda64dd452d80996bb647adb33a
           Boot ID: 3b3019c9d2c6425f909bb120ef40141a
    Virtualization: kvm
  Operating System: Ubuntu 18.04.6 LTS
            Kernel: Linux 4.15.0-213-generic
      Architecture: x86-64

Using the “neofetch” Utility

Neofetch is a command-line system information tool that displays information about your system, its software, and themes in an aesthetic and visually pleasing way.

Install Neofetch: If you haven’t installed neofetch, you can do so with the following command:

sudo apt install neofetch

Run Neofetch:


The output will display a colorful logo of the operating system alongside various system details, including the Ubuntu version.

See also  How to Remove the "This site may harm your computer" warning?

Commands Mentioned

  • lsb_release -a – Retrieves information about the Linux distribution, including the Ubuntu version.
  • cat /etc/os-release – Displays the OS release information.
  • cat /etc/lsb-release – Shows the LSB (Linux Standard Base) release details.
  • hostnamectl – Provides details about the system’s hostname and OS.
  • sudo apt install neofetch – Installs the neofetch utility.
  • neofetch – Runs the neofetch utility to display system information.


Ubuntu offers multiple methods to check its version, catering to users with varying preferences and needs. Whether you’re a command-line enthusiast or prefer graphical methods, Ubuntu ensures you can quickly and efficiently determine your system’s version.

Remember to regularly check for updates to stay abreast of security patches and new features.

For those interested in understanding more about web servers, you might find our articles on the best web servers, Apache, Nginx, and LiteSpeed particularly insightful. For more insights into web hosting and servers, consider exploring our articles on dedicated servers, VPS servers, and other related topics.

Looking to supercharge your Ubuntu projects with the best hosting available? We’ve got your back. After thorough evaluations, we’ve listed the top contenders in our “Best Ubuntu Hosting 2023” roundup. Ensure your online ventures are in expert hands.

See also  How to Setup Squid Proxy Server on Linux CentOS 6.3

Welcome to the comments!


  1. Why do I need to know my Ubuntu version?

    Knowing your Ubuntu version is essential for software compatibility, receiving security updates, and effective troubleshooting. Different versions might have unique features or issues, making it crucial for optimal system performance and security.

  2. Can I upgrade my Ubuntu version?

    Yes, Ubuntu allows users to upgrade to newer versions. However, it’s recommended to backup important data before proceeding and ensure that the new version is compatible with your applications and hardware.

  3. What is the difference between LTS and regular releases?

    LTS stands for Long Term Support. LTS releases are supported for five years, while regular releases have a nine-month support period. LTS versions are considered more stable and are recommended for production environments.

  4. How often does Ubuntu release new versions?

    Ubuntu typically releases new versions every six months, in April and October. LTS releases occur every two years in April.

  5. Is there a way to automate checking for Ubuntu version updates?

    Yes, Ubuntu has an in-built update manager that periodically checks for updates. Users can also configure automatic notifications for new releases through system settings.


Leave a Reply

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