What Version of Linux Am I Running?

Asking “What version of Linux am I running?” could generate a few different answers. Do you want to know the version of the Linux kernel, or just the name of the Linux distribution that’s installed? We’ll show you how to find all the answers in this guide.

What Comprises a Linux System?

Linux is comprised of multiple components, all with their own version names and numbers. All of the following would need to be included in a complete answer to the question of “What version of Linux is this?”:

  • The version of the Linux kernel
  • The distribution that is installed (i.e. Ubuntu, Fedora, Debian)
  • The version of the distribution (i.e. Ubuntu 18.04 or Ubuntu 20.04)
  • The edition of the operating system (i.e. Ubuntu Desktop or Ubuntu Server)

Now, let’s move on to answering each of these questions.

Check Linux Version With Commands

Method 1. The hostnamectl command will tell you the operating system, kernel, CPU architecture, and other various information:

$ hostnamectl

Terminal output of the hostnamectl command

Some distributions may show more or less information in this output, which is why it’s important to know a few different commands.

Method 2. If you just want to see the Linux kernel version and don’t need the other information, the quickest way to obtain that will be with the uname command.

$ uname -r

5.8.0-59-generic

The information above can be interpreted like so:

  • 5 – kernel version
  • 8 – major revision
  • 0 – minor revision
  • 59 – patch number

To see additional info, append the -a option.

$ uname -a

Linux ubuntu 5.8.0-59-generic #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

Method 3. The lsb_release command will give you some pretty specific information about your distribution version and even its codename. However, not every distribution comes with the necessary package installed by default to run this command.

$ lsb_release -a

Terminal output of the lsb_release command

Method 4. You can take a peek inside the /etc/os-release file, which almost always contains adequate information about your Linux install.

$ cat /etc/os-release

Terminal output displaying the contents of the os-release file

You could also try this command, which will check that directory’s other pertinent files for even more information:

$ cat /etc/*release

Terminal output displaying the contents of all release files

Method 5. The commands above ought to suffice, but here’s one more for good measure: the /proc/version file.

$ cat /proc/version

Linux version 5.8.0-59-generic (buildd@lcy01-amd64-022) (gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0, GNU ld (GNU Binutils for Ubuntu) 2.34) #66~20.04.1-Ubuntu SMP Thu Jun 17 11:14:10 UTC 2021

Check Linux Version With GUI

If you are running a GUI, you can undoubtedly find information about your operating system in there as well. The instructions for finding it will vary depending on what desktop environment you’re running.

For example, in the GNOME desktop environment, the information can be found in Settings > About.

Viewing Linux version information from the desktop environment

Leave a Comment

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