How to check Ubuntu version

Being aware of your current Ubuntu version will help you know when it is time to update. It’s important to know the version of your Ubuntu Linux system, as LTS versions are released every 2 years, and interim versions every 6 months.

In this tutorial, you will see several methods that can be used to check the version of Ubuntu. Keep in mind that Ubuntu version numbers follow the format of YY.MM, so an Ubuntu 22.04 install was released in April, 2022.

Ubuntu also uses code names, like Jammy Jellyfish, which feature one adjective and one name of an animal. These are just a fun nickname given to each release, with the YY.MM format being the best indicator of how old your Ubuntu version is.

In this tutorial you will learn:

  • Several methods for checking Ubuntu version
How to check Ubuntu version
How to check Ubuntu version
Software Requirements and Linux Command Line Conventions
Category Requirements, Conventions or Software Version Used
System Ubuntu Linux
Software N/A
Other Privileged access to your Linux system as root or via the sudo command.
Conventions # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
$ – requires given linux commands to be executed as a regular non-privileged user

How to check Ubuntu version




See some of the methods below to check your Ubuntu version. All accomplish the same task, and none require root permissions, so use whichever you find most convenient.

    1. One of the simplest ways to see your Ubuntu version is with the hostnamectl command. This is provided by systemd, which is standard across all editions of Ubuntu. Depending on your release, either the version or the release code name is revealed in the output.
      $ hostnamectl
      

      Checking Ubuntu version with hostnamectl command
      Checking Ubuntu version with hostnamectl command
    2. Another way to see this same information is by viewing the /etc/issue file.
      $ cat /etc/issue
      
      Use the cat command to check the contents of the /etc/issue file
      Use the cat command to check the contents of the /etc/issue file



    3. Another file you can check is the /etc/os-release file. This one contains both the version number and release code name.
      $ cat /etc/os-release
      

      The /etc/os-release file shows our version number and code name
      The /etc/os-release file shows our version number and code name
    4. Yet another file that contains the Ubuntu version number is the /etc/lsb-release file.
      $ cat /etc/lsb-release
      

      The /etc/lsb-release shows the version number of Ubuntu
      The /etc/lsb-release shows the version number of Ubuntu
    5. Another way to see the version number is to execute the lsb_release command along with the -crid options.
      $ lsb_release -crid
      

      Executing the lsb_release command on Ubuntu
      Executing the lsb_release command on Ubuntu


  1. Lastly, there’s always a way to view the Ubuntu version via GUI, in case you don’t like to use the command line. This is going to differ a little, depending on the desktop environment you’re using. In the GNOME desktop environment on Ubuntu, the information is located under Settings > About.

    Checking the Ubuntu version via GUI in GNOME settings
    Checking the Ubuntu version via GUI in GNOME settings

Closing Thoughts

As seen in this tutorial, Ubuntu gives us many ways to check the version of the operating system, either from command line or GUI. Knowing which version of Ubuntu you’re on, and what type of release it is – either long term support or interim – will help you determine when it’s time to update. It’s always a good idea to keep your Ubuntu system up to date, especially to the latest LTS release.