How To Check and Find CentOS Version?

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/check-find-centos-version/
PINTEREST
PINTEREST
INSTAGRAM

CentOS or RedHat Enterprise Linux is popular enterprise level Linux distribution. Different versions of the CentOS and RHEL is use In enterprise environment. Because of its stability and long time support old versions of CentOS and RHEL systems works in production too. In this tutorial w will look different ways to check and find CentOS and RHEL systems.

hostnamectl Command

hostnamectl is very useful command which provides some basic information about the CentOS system like version. We can run command and see the Operating System: line which is CentOS 7

hostnamectl Command

hostnamectl Command

Rpm Command

rpm is a tool used to manage system tools and packages. As packages are compiled according to operating system version and architecture rpm command has information about the CentOS version and architecture too. We can use--query centos-release option in order to list CentOS version like below.

Rpm Command

Rpm Command

lsb_release Command

lsb_release command is mainly designed to provide the CentOS version and subversion. By default it is not installed but we can install it like below.

and then we can run like below.

lsb_release Command

lsb_release Command

Release Files

Release versions of CentOS and RedHat also saved in different files according to the version of the system. Here list of the files those provides the system version.

  • /etc/centos-release
  • /etc/os-release
  • /etc/redhat-release
  • /etc/systemm-release

We can run a single cat command which will print version information from all of them like below.

LEARN MORE  How To Install Updates In Ubuntu, Debian, Mint, Kali

Release Files

Release Files

As we can see we will get a lot of duplicate but consistent version information from this command.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/check-find-centos-version/
PINTEREST
PINTEREST
INSTAGRAM

You may also like...

Leave a Reply

Your email address will not be published.

Enjoy this blog? Please spread the word :)