How To Check OS Version with Linux Command Line – Guide
Linux is a free and open source operating system. There are many types of Linux. They are commonly called Linux distributions. Suse, openSUSE, Debian, Ubuntu, CentOS, Arch, Fedora, RHEL are all common Linux distribution names. Knowing the version and name of your operating system can be very useful for security patches. The Linux kernel is like the core brain of the operating system. While it is open source, meaning anyone can view and modify the code, the Linux kernel is built with multiple protocols to ensure stability and security. This guide will show you how to check your distribution’s Linux kernel version.
How to Check the Linux OS version using lsb_release
lsb_release is a utility pre-installed on major Linux distributions that can be used to display Linux Standard Base information on the command line interface. Use the command below to determine your system OS version: If it is not pre-installed on your operating system, you can use your package manager to install this utility: apt is the package manager on Debian based systems. If you just want the version number instead of all the LSB information, use the following command:
Check the Linux version in the /etc/issue file
/etc/issue is a plain text file that contains system identification information. This information is printed on the screen before the login prompt. Use the command below to display the contents of the file in the command line interface:
Check the Linux OS version in the /etc/os-release file
The /etc/os-release file contains all operating system related information. It is a configuration file only included in the systemd package of newer Linux distributions. To show the contents of the /etc/os-release file in the CLI, use the command below.
Check Linux version with hostnamectl command
The main purpose of the hostnamectl command is to change or verify the hostname; but this command can also be used to check the OS and Kernel version of the system:
How to Check the OS version on an old Linux system
If you are running a very old Linux distribution, you may not be able to use any of the above commands. Use the following command to find out the OS version on your old system: How to check the Linux kernel version of the system using the uname command. The uname command can be used to display your system’s kernel version in the terminal:
Final note
I hope you like the guide How To Check OS Version with Linux Command Line. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.