If you are a 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.
Related: What Is Linux? A Guide for Non-technical Users
When most people talk of Linux, they are usually referr to a Linux distribution, but this is not the case. Above all, “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 a kernel. A kernel is the lowest level of software that can interface with computer hardware.
In other words, the kernel is a bridge between the software and hardware of a computer.
2. Linux OS
On the other side, Linux-based operating systems are called Linux distributions which usually include the Linux kernel and software package managers, software, and graphical user interface.
Generally speaking, Linux operating system has primarily three components:
- The kernel is a program at the heart of the Linux operating system that takes care of fundamental stuff, like letting hardware communicate with software.
- System Libraries are special functions or programs using which application programs or system utilities access the kernel’s features. These libraries implement most of the functionalities of the operating system.
- System Utility programs are responsible for doing 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 determine what distribution and its version number are 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:
Here is what the output of the command looks like in Debian:
And here’s what it looks like in an RHEL-based distribution, in this case, AlmaLinux:
As you can see, 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 distributions 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
3. Using the lsb_release command
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 command should work on every Linux distribution, as long as you’ve installed the
For more about the
lsb_release command in Linux, consult its manual page.
How to Check 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 shows the version of the Linux kernel you’re using and additional details.
To obtain more detailed Linux kernel information, you can also read the contents of the
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 kernel compilation time. It also contains the kernel compiler’s user name.
Now you know how to check what Linux version you’re running. From all the information mentioned above, I hope you can now find the installed version of any Linux distribution.
If you feel any difficulty related to the ways mentioned above, then let us know via your feedback in the comments. We will welcome your queries.
Are you new to Linux? Here is the list of basic Linux commands containing all the common commands you’ll need to know to get you started.
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.
hardinfo is a package in
and it is not installed by default in Debian 11 (stable).
– – –
To Bobby Borisov,
One small failure in your article is that a Debian user will not be able to know which *minor* version (s)he is using.
is the major version number. We can not know if it is 11.1 or 11.2 or 11.3 or …
After reading and seaching (back in feb. 2020)
, I found it:
$ cat /etc/debian_version
will report the minor version of your Debian version.