how to check os version in Linux

how to check os version in Linux

Linux is a free and open-source operating system and there are several Linux variants available, which we call Linux distributions. Suse, OpenSUSE, Debian, Ubuntu, CentOS, Arch, and Fedora, are the common distributions of RHEL which are used for server and client use. we use Linux operating system but sometimes we do not know which version of Linux is used, so in this article, we will tell you how to check the os version in Linux.

Check os version in Linux

To check the OS version of Linux, you have to run the following command in the terminal. To open a terminal in Linux, press the ctrl + shift + L keys simultaneously from the keyboard.

The /etc/os-release file

Open the /etc/os-release file with the help of the cat text editor, where you can see the Linux version, ID, OS name, etc.

# cat /etc/os-release

If you want to filter only Linux version from the /etc/os-release file then you can use the grep command for this.

#grep '^VERSION' /etc/os-release
#grep '^(VERSION|NAME)=' /etc/os-release

The /etc/os-release file

To check the version in the Linux system, you can find the version from the /RedHat-release file which is located under the/etc directory.

#cat /etc/redhat-release

hostnamectl command

hostnameclt command is used to check and change the hostname of the Linux system, with this command you can also see information like hostname, architecture, boot id, system id, operating system name, kernel version, etc.

#hostnamectl

uname command

The uname command is used to check Linux system information such as system kernel information, system version, hardware, etc.

The uname command is used to check Linux system information such as system kernel information, system version, hardware, etc. You can use the uname command with the option ( -r, -m, -s, -r, -p ) to check the extra information of a Linux system.

#uname -r

open the version file in Linux

To check the version of Linux or other Linux distributions os, you can check it in the version file located inside the /proc directory.

Conclusion

It is very important for system administrators to know the OS version and kernel version of the system as it helps in providing the update feature, and information about your system. If you are using a Linux system with a GUI desktop then you can find out the version from the desktop environment with the help of system Mouse.

Visit our other simiservice.com blogs for product reviews and the latest product releases

Rate this post