How to find out what version of Linux you are using

If you’re a new Linux user (or not) and need this information, here’s How to find out what version of Linux you are using.

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

When most people talk about Linux, they usually mean a Linux distribution, but that’s not the case. Above all, the question “What version of Linux am I running?” it can mean two different things.

1. Linux Kernel

Most people think of Linux as an operating system, but it’s actually 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 a computer’s software and hardware.

2. Linux OS

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

Generally speaking, the Linux operating system has basically three components:

  • Kernel is a program at the heart of the Linux operating system that takes care of fundamental things like allowing the hardware to communicate with the software.
  • System libraries are special functions or programs that use application programs or system utilities that access kernel resources. These libraries implement most operating system functionality.
  • System utility programs are responsible for performing specialized individual-level tasks.

That said, if you’re a new Linux user (or not) and want to know what version of Linux you’re running, here’s how to do that using the command line below.

How to find out what version of Linux you are using

How to find out which version of Linux you are using
How to find out what version of Linux you are using

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

How to find out the name of the Linux distribution and its release version

There are several ways to find out which distribution and its version number is running on a system.

Below, we’ll 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

And the output will be something like this:
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION="11 (bullseye)"

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 direct answer to your request for a Linux OS version number, try this cat command:
cat /etc/issue

And the output will be something like this:
Debian GNU/Linux 11 \n \l

3. Using the lsb_release command

The lsb_release command is a useful utility for finding information about your Linux installation. It displays LSB information (Linux Standard Base) about the Linux distribution.

The syntax is:
lsb_release -a

And the output will be something like this:
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye

The lsb_release command should work on all Linux distributions, as long as you have installed the lsb-release package.

For more information on the lsb_release command on Linux, see your man page.

How to find the Linux kernel version

Now, if you want to know which version of Linux kernel you are using, type the following command in the terminal and press Enter:
uname -a

And the output will be something like this:
Linux deb-srv 5.10.0-8-amd64 #1 SMP Debian 5.10.46-4 (2021-08-03) x86_64 GNU/Linux

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

For more detailed Linux kernel information, you can also read the contents of the /proc/version file.
cat /proc/version

And the output will be something like this:
Linux version 5.10.0-8-amd64 ( (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 Linux kernel version, the gcc version used to compile the kernel, and the kernel compile time. It also contains the kernel compiler username.


Ready! Now you know how to check which version of Linux you are running.

From all the information as mentioned above, I hope you can now find the installed version of any Linux distribution.

If you experience any difficulties related to the above mentioned ways, please let us know through your feedback through the comments. We will receive your queries.

Sobre o Edivaldo Brito

Edivaldo Brito é analista de sistemas, gestor de TI, blogueiro e também um grande fã de sistemas operacionais, banco de dados, software livre, redes, programação, dispositivos móveis e tudo mais que envolve tecnologia.

Deixe um comentário

Esse site utiliza o Akismet para reduzir spam. Aprenda como seus dados de comentários são processados.

Ads Blocker Image Powered by Code Help Pro

Bloqueador de anúncios detectado!!!

Nosso site precisa de publicidade para existir. Por favor, insira-o na lista de permissões/lista branca para liberar a exibição de anúncios e apoiar nosso site. Nosso conteúdo é GRATUITO, e tudo o que pedimos é isso!