There are many reasons why you need to know which OS version you are using. For example, when installing software packages or troubleshooting system problems, knowing the operating system version makes matters much easier. It also helps to make sure your Linux operating system is up to date. CentOS 7 will be supported until June 30, 2024. Knowing your CentOS version will tell you how long your system will be supported. In this guide we will see various commands on how to check CentOs version using terminal.
- 99RDP VPS/Dedicated Server(Running CentOs)
- Access To Terminal
Steps To Check CentOs Version Using lsb
Linux Standard Base (LSB) is a shared project of several Linux distributions under the organization of the Linux community to standardize the software system structure. In order to develop and promote an open standard that increases compatibility between Linux distributions and allows software applications to run on any compliant system, even in binary form. With the basic lsb_release -d command we can check the distribution information. Run the given command to install and check CentOs version using terminal.
# yum install redhat-lsb-core -y
# lsb_release -d
Steps To Check CentOs Version Using hostnamectl
The next tool comes by default with CentOs versions. We can use the hostnamectl command to check system hostname and system related information. For example:- Which kernel version is running, Machine ID, System Hostname, Os Information and etc.
Steps To Check CentOs Version Using rpm
rpm is a command-line utility for managing, querying rpm packages and system-related information. Enter the given command in terminal to query the CentOs version using rpm.
# rpm –query centos-release
Steps To Check CentOs Version By os-release File
Use the given command to retrieve OS release information from the os-release file.
# cat /etc/os-release
In this we learned four methods to check CentOs version using the terminal. That’s all for the moment! If you know of any other methods that should be mentioned here, let us know. For more information on CentOS releases, visit the given link.