What Linux Version Am I Running? Here’s How to Find Out

1
What Linux Version Am I Running

If you are new Linux user and want to know how to find what Linux version you are running, here’s how to do it by using the command line.

There are various reasons why you might want to find which Linux distribution you are using or the OS version of your Linux system.

When most people talk of Linux, they are usually referring to a Linux distribution, but this is not the case. Above all, the question “What Linux version am I running?” can mean two different things.

1. Linux Kernel

Most people think of Linux as an operating system but it is actually a kernel. A kernel is the lowest level of software that can interface with computer hardware. In other words, kernel is a bridge between the software and hardware of a computer.

2. Linux OS

On the other side, Linux-based operating systems are actually called Linux distributions which usually include the Linux kernel along with software package managers, software, and graphical user interface.

Generally speaking, Linux operating system has primarily three components:

  1. Kernel is a program at the heart of the Linux operating system that takes care of fundamental stuff, like letting hardware communicate with software.
  2. System Libraries are special functions or programs using which application programs or system utilities accesses kernel’s features. These libraries implement most of the functionalities of the operating system.
  3. System Utility programs are responsible to do specialized, individual level tasks.

What Linux Version Am I Running?

Let’s find out now how to check what Linux distribution and kernel version is installed on your system using the command line.

How to Find Out Linux Distribution Name and Its Release Version

There are several ways to find out what distribution and its version number is running on a system. Below we will show you the three most commonly used approaches.

1. Displaying the contents of the /etc/os-release file

Open the terminal and type the following command:

cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

The /etc/os-release file contains operating system identification data, including information about the distribution and its release version. This file is part of the systemd package and should be present on all modern Linux distribution running systemd.

2. Displaying the contents of the /etc/issue file

For a more straightforward response to your request for a Linux OS version number, try this cat command:

cat /etc/issue
Debian GNU/Linux 11 \n \l

3. Using the lsb_release command

The lsb_release command is a helpful utility to find out information about your Linux installation. It displays LSB (Linux Standard Base) information about the Linux distribution.

The syntax is:

lsb_release -a
Distributor ID:	Debian
Description:	Debian GNU/Linux 11 (bullseye)
Release:	11
Codename:	bullseye

The lsb_release command should work on every Linux distribution, as long as you’ve installed the lsb-release package.

For more about lsb_release command in Linux, consult its manual page.

How to Find Out Linux Kernel Version

If you’d like to know which version of the Linux kernel you’re using, type the following command into the terminal and press enter:

uname -a
Linux deb-srv 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux 

The command uname -a shows the version of the Linux kernel you’re using, as well as additional details.

In order to obtain more detailed Linux kernel information, you can also read the contents of the /proc/version file.

cat /proc/version
Linux version 5.10.0-8-amd64 ([email protected]) (gcc-10 (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for Debian) 2.35.2) #1 SMP Debian 5.10.46-4 (2021-08-03) 

As you can see, the /proc/version file specifies the version of the Linux kernel, the version of gcc used to compile the kernel, and the time of kernel compilation. It also contains the kernel compiler’s user name.

Conclusion

Now you know how to check what Linux version you’re running. From all the information, as mentioned above, I hope now you can find the installed version of any Linux distribution.

If you feel any difficulty related to the ways as mentioned above, then let us know via your feedback through the comments. We will welcome your queries.

Are you new to Linux? Here all the list of basic Linux commands contains all the common commands you’ll need to know to get you started.

If this guide has helped you, please consider buying us a coffee.

Buy me a coffee!

Your support and encouragement are greatly appreciated!

1 Comment

  1. Commands are great if you are a system administrator running a server without a desktop, but if you are a mere mortal using a Linux OS you might want to use a GUI to find that information. I recommend “hardinfo” which will show up under Applications as
    Applications> System Tools> System Profiler and Benchmark.
    It will give you all the information the aforementioned commands will and more.

Leave a Reply

Your email address will not be published.

Latest from Tips & Tricks