July 2, 2024
Tutorials

How to Check OS Version in Linux

How to Check OS Version in Linux

The operating system (OS) version in Linux refers to the specific release/version of the Linux distribution installed on your machine. There are multiple operating systems based on Linux. Among them, some of the popular distributions are Red Hat, Ubuntu, Debian, CentOS, and OpenSUSE.

In Linux, checking the OS version can be an important step for ensuring compatibility while installing software. This information can also be helpful for system administration and troubleshooting.

If you are curious about how to check the operating system (OS) version of Linux, this article will provide you with various methods.

How to Check the OS Version in Linux?

Method 1: Inspect OS Version using “lsb_release”

In Linux-based operating systems, the “lsb_release -a” is one of the commonly used commands to check the OS (Operating System) details, including its version:

lsb_release -a

In the output, you can find brief details about your Linux system, such as under the description, the official name of the operating system (Ubuntu 22.04.4 LTS), and the release showing the version number (22.04).

Method 2: Check the OS Version with “hostnamectl”

You can view your Linux operating system version and other information such as kernel and architecture with the simple command provided below:

hostnamectl

This command displays:

  • The operating system (OS): Ubuntu 22.04.4 LTS, which is the official name of your Linux distribution.
  • Kernel: Linux 6.5.0-26-generic, a kernel version of your OS.

You can also view the other details including architecture (x86-64).

Method 3: Check OS Version via “cat /etc/os-release”

The command in the following is used in Linux-based operating systems (OS) to display information about your system release/version:

cat /etc/os-release

When this command executes, it provides a quick summary of your operating system, including its version number (i.e. 22.04.4 LTS (Jammy Jellyfish)).

Method 4: View the Linux OS Version using “cat /proc/version”

Linux users can also utilize the following command to view the Linux version in the terminal:

cat /proc/version

After executing the command, you can view brief information, including the kernel version of your Linux system.

Method 5: Display OS Version using “uname -a”

The name “uname” stands for “Unix name”, which can be used to check basic information about your operating system (OS). To display all information about your system, use the “-a” option with the following syntax:

uname -a

The command displayed the available information about your Linux system, including the current version running on your system.

Method 6: Check OS Version Through “System Information”

With the help of a graphical interface, you can view the version or release of your Linux operating system (OS):

  • Click on the “Show Application” icon.
  • Enter “about” in the search field.
  • Click on “About”.

Following the above process will display the “About” page on your screen containing the basic information of your Linux system.

As shown above, you can see the name of your operating system along with the version number under the OS Name.

Conclusion

The Linux system offers various methods to check your Operating System (OS) version. You can either use the Linux terminal or a graphical interface to view basic information, including its version/release number. The commonly used command is “lsb_release -a”, while alternatively, you can use: “hostnamectl”, “cat /etc/os-release”, “cat /proc/version”, and “uname -a”.

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video