The question "what version of Linux" can mean two different things. Strictly speaking, Linux is the kernel, so the question can refer specifically to the kernel's version number, or "Linux" can be used more colloquially to refer to the entire distribution, as in Fedora Linux or Ubuntu Linux.

Both are important, and you may need to know one or both answers to fix a problem with a system. For example, knowing the installed kernel version might help diagnose an issue with proprietary drivers, and identifying what distribution is running will help you quickly figure out if you should be using apt, dnf, yum, or some other command to install packages.

The following will help you find out what version of the Linux kernel and/or what Linux distribution is running on a system.

How to find the Linux kernel version

To find out what version of the Linux kernel is running, run the following command:

uname -srm

Alternatively, the command can be run by using the longer, more descriptive, versions of the various flags:

uname --kernel-name --kernel-release --machine

Either way, the output should look similar to the following:

Linux 4.16.10-300.fc28.x86_64 x86_64

This gives you (in order): the kernel name, the version of the kernel, and the type of hardware the kernel is running on. In this case, the kernel is Linux version 4.16.10-300.fc28.x86_64 running on an x86_64 system.

More information about the uname command can be found by running man uname.

How to find the Linux distribution

There are several ways to figure out what distribution is running on a system, but the quickest way is the check the

Read more from our friends at Opensource.com