March 1, 2023

How To Check CentOs Version Using Terminal

Abhishek Thakur


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.

Requirements

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

Check CentOs Version

 

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.

# hostnamectl

 

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

Check Centos Version USing rpm

 

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

CentOS version using Terminal

 

Conclusion

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.


Buy CentOs 7 Dedicaed Server @ $ 89/m Only

Popular Blog Posts