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:
- 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 accesses kernel’s features. These libraries implement most of the functionalities of the operating system.
- 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:
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/"
/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
Debian GNU/Linux 11 \n \l
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:
Distributor ID: Debian Description: Debian GNU/Linux 11 (bullseye) Release: 11 Codename: bullseye
lsb_release command should work on every Linux distribution, as long as you’ve installed the
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:
Linux deb-srv 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux
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
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.
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.