Linux is one of the most famous open-source operating systems. Since users have the right to make desirable changes and distribute as they like, a huge number of different Linux distributions are available in the market. 

Regular users must know what Linux distribution they are using, and which kernel version it runs on. This short guide will explain how to figure out this information. 

What is Kernel?

A kernel is a core component of not only Linux, but any operating system that handles basic functions like memory usage, input/output operations, and process scheduling. It serves as a bridge between applications and data processing that takes place at the hardware level.  

Why Find Out Linux OS Name & Kernel Version?

Troubleshooting issues or installing new software applications are your routine if you are a Linux user or system administrator. When you install a new app, you must figure out its compatibility level with the Linux distro (OS Name) and kernel version under your use. The compatibility level can vary greatly depending on the new software, OS name, and kernel version. You should have this information to easily install and run appropriate packages and handle the errors and bugs. 

Even if you seek technical support, the support team representative will ask you about the distro you use to offer quick assistance. Similarly, you may look at online forums when trying to fix the errors. People at those forums would be able to offer more specific solutions if you give them the right basic information.

So, you should know your Linux OS Name and kernel version because it helps during troubleshooting issues, installing new applications, and much more.

How to Find the Linux OS Name?

There are two commands to find out the Linux OS Name. Let us cover one by one.  

Method 1: Lsb_release command

It is a simple command that stands for “Linux Standard Base Release”. Here is what you type on the terminal when you give this command:

$ sudo lsb_release -a

The output of lsb_release command mentions four things:

  1. Operating system distribution or Distributor ID: It is the name of an Operating system that you use, for example, Debian, Fedora, or Ubuntu.
  2. Description: It refers to distribution. For example, Ubuntu 22.04.3 LTS in this case. 
  3. Release: It tells you about the release number. 
  4. Codename: It is the codename given to that particular release. 

When you have this standard information about your OS, you avoid compatibility issues.

Method 2: Cat Command

The “cat” command can be used to show the information about the system’s operating system and kernel version. The exact command you have to type is:

$ sudo cat /etc/os-release

The output of cat command displays the following information. 

  1. NAME – The name of your operating system distribution. 
  2. VERSION – It lets you know the version number of your operating system. 
  3. ID – It is the ID of your distribution. 
  4. ID_LIKE: It tells you about the IDs of distribution that are the same as yours. 
  5. PRETTY_NAME: This is where you get a human-readable description. For example, in this case, it is, “Ubuntu 22.04.3 LTS”
  6. VERSION_ID: It is the version identification number for your operating system distribution.

It is easy to figure out software packages and updates compatible with your Linux machine when you know your Linux OS name. 

How to Find Your Linux Kernel Version?

There are two methods for finding Linux kernel Version:

Method 1: The uname Command

Typing the “uname” command with the “r” option is the most simple way to find your Linux kernel version. So, open the terminal window and type:

$ sudo uname -r

This information is valuable when you troubleshoot issues caused by driver installation and hardware compatibility. 

Method 2: The cat command

The file “/proc/version” has a complete version string of the currently running kernel. Moreover, it contains additional build information, for example, patch level and compiler version. It is “/proc/version”. All you have to type is:

$ sudo cat /proc/version

Now, you will see a long string. It has all your system’s build information and your kernel information. It gives much more extensive information than the previous uname method. The unmae method gives readable information, while the cat method provides information in a quite complex format. It is not easy to understand for beginners.     

Pro Tip: A Single Command to Find Both Linux OS Name and Kernel Version

Now, here is a super command that gives you both the OS name and kernel version at the same time. Also,  it shows all information in an easily readable format. All you have to type is:

$ sudo hostnamectl

Graphical Way to Find Out Linux OS

If you want to avoid using a terminal, here is a quick three-step process to do it graphically. 

Step I: Click the start menu below

Step II: Hit the ‘Settings’ button in the shown menu. 

Step III: Click About in the shown Settings menu. You can find it at the end of the right-hand-side menu. 

Note: This method gives you a lot of basic information but not the kernel version.