How to check your Linux version

If you need to find the actual Linux version or even the Linux kernel version, please read the following article.

What version of Linux are you running? Ubuntu? Arch? Or Red Hat? No, this is not what you really want to know, is it? If you need to find the actual Linux version or even the Linux kernel version, please read the following article.

Ways to check your Linux version

  1. Operating system or kernel version: what's the difference?
  2. Display the Linux version on the desktop version
  3. How to check your Kernel version and Linux distribution.
    1. 1. Check the Linux operating system version with cat / etc / os-release
    2. 2. Check the Linux version with cat / etc / * release
    3. 3. Check the Linux version with cat / etc / issue
    4. 4. Check your Linux distribution with lsb_release -a
    5. 5. Display the Linux Kernel version with hostnamectl
    6. 6. Use uname -r to check the Linux Kernel version
    7. 7. Get more information about Linux kernel with uname -mrs
    8. 8. Show more information about Linux kernel version with uname -a
    9. 9. Details of Linux kernel with cat / proc / version

Operating system or kernel version: what's the difference?

The first thing to check is whether you are looking for an operating system version or Kernel version. For example, if you use Ubuntu, the operating system version might be 19.04. The kernel, on the other hand, is the core of Linux, the code that allows the software to communicate with the hardware.

Display the Linux version on the desktop version

In addition to the nine command line options below, you can check the Linux version from the desktop. This will vary depending on the desktop environment and operating system. However, if you want to check your Ubuntu version, CentOS version or distribution without a command line, you can use this method.

For example, to check the Ubuntu version from the desktop, go to System Settings> Details . Here, you will see the destro version is running. Although this does not provide detailed information like the command line, it is sufficient to determine the Linux version.

How to check your Kernel version and Linux distribution.

Desktop computers only provide basic information about the Linux version. For more information, you need to use the command line.

Many commands can reveal interesting information about Linux systems. In addition to information on Linux versions, you can find distribution distributions, code names and Kernel. This information can be useful in many situations such as troubleshooting or simply checking when an Linux version is needed.

Here are nine commands that help you check your Linux version and Kernel version from the Terminal.

1. Check the Linux operating system version with cat / etc / os-release

Picture 1 of How to check your Linux version

The first option is to check the os-release file in the / etc / directory. This file provides quite a lot of information about the Linux operating system version. To view this file, use the cat command (concatenate), display or create a new file.

 cat /etc/os-release 

The example here is done with Ubuntu and get the operating system name, full version, version ID and code name.

2. Check the Linux version with cat / etc / * release

Picture 2 of How to check your Linux version

You can gather more information by using the * release file. It will display all the information from files ending with release in / etc / with a single output.

 cat /etc/*release 

The output is largely the same as the previous command but adds the distribution information.

3. Check the Linux version with cat / etc / issue

Picture 3 of How to check your Linux version

To get basic information about Linux operating system version numbers, try this cat command:

 cat /etc/issue 

With this command, you will see the name and destro version.

4. Check your Linux distribution with lsb_release -a

Picture 4 of How to check your Linux version

The lsb_release command will display Linux Standard Base (lsb) information about the Linux distribution.

 lsb_release -a 

Note the distributor name as well as the destro name, release name and code name in the command output. This is a simple command with concise and clear results.

5. Display the Linux Kernel version with hostnamectl

Picture 5 of How to check your Linux version

The hostnamectl command is used to change the system hostname but is used alone to display Linux version information.

 hostnamectl 

Using this command will display the host name of the device along with the device ID and structure. You can also see the Linux version and the Linux kernel version with hostnamectl.

6. Use uname -r to check the Linux Kernel version

Picture 6 of How to check your Linux version

Although the above command displays information about the Linux kernel version, if you want, you can try the uname -r command.

 uname -r 

This command will display the Linux kernel version number of the distribution. You will only see the version number and no text with this command.

7. Get more information about Linux kernel with uname -mrs

Picture 7 of How to check your Linux version

You can expand switch -r to mrs to get more information about the Linux version of the distribution you are currently using.

 uname -mrs 

-Mrs command provides information about kernel name and hardware version. Here, we run the command on Raspberry Pi 4 showing armv71. Based on 32-bit or 64-bit Intel / AMD displays x86_64.

8. Show more information about Linux kernel version with uname -a

Picture 8 of How to check your Linux version

You get even more information about the Linux kernel with the -a command extension.

 uname -a 

With the above command, the device name, Linux kernel version, release date, architecture and on the full operating system will be revealed.

9. Details of Linux kernel with cat / proc / version

Picture 9 of How to check your Linux version

The last option to check the Linux kernel version is to use another cat command. This command uses the version file in / proc directory.

 cat /proc/version 

You will see the Linux kernel version number, which is aggregated from the file information / proc / sys / kernel / ostype, / proc / sys / kernel / osrelease and / proc / sys / kernel / version.

With these nine command line options, you now know which version of Linux is running.

Hope you are succesful.

Update 29 August 2019
Category

System

Mac OS X

Hardware

Game

Tech info

Technology

Science

Life

Application

Electric

Program

Mobile