As a system administrator or developer, it is essential to know the operating system version of the Linux distribution you are working with. This information is crucial when installing packages, updating the system, or troubleshooting issues. In this article, i will show the steps on how to check the operating system version in Linux. This article will cover on how to check OS version in linux popular distributions – RedHat/CentOS/Oracle Linux and Debian based OS.
There are several ways to check what CentOS version is running on your linux VPS. Below are some examples of how to determine the CentOS version. The following command works with all CentOS versions.
Steps to Check OS Version in RedHat/CentOS/Oracle Linux based OS
Type the command “cat /etc/redhat-release” – This command will display the RedHat version information, including the release number, code name, and other details.
# cat /etc/redhat-release
Sample output :
Red Hat Enterprise Linux release 8.7 (Ootpa)
Steps to Check OS Version in Debian based OS
# lsb_release -a
Sample output :
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 20.04.5 LTS Release: 20.04 Codename: focal
Steps to check the kernel version
# uname -a Linux vps.linodelinux.com 4.9.15-x86_64-linode81 #1 SMP Fri M
Type the command “lsb_release -a” – This command will display the Debian version information, including the release number, code name, and other details.
Checking the operating system version in Linux is a simple process that can be accomplished using the Terminal or putty connection. As a system administrator or developer, it is essential to know the version of the Linux distribution you are working with to ensure the smooth functioning of your system. By following the simple steps blog post, you can quickly and easily check the operating system version in RedHat/CentOS and Debian based OS. With this information, you can confidently install packages, update the system, or troubleshoot issues.