How to Check Version of CentOS

29/12/2020
Red Hat Enterprise Linux or RHEL in short is a commercial Linux based operating system. RHEL provides paid support for its customers. While most of the softwares used in RHEL is the same as the standard versions of these software found in other Linux distributions such as Ubuntu/Debian, RHEL only gives support for these software.

A commercial Linux distribution like RHEL is very stable as only old, stable and thoroughly tested software are distributed. RHEL also has long term support for all its releases. So it is ideal for small, medium and big companies and institutions.

CentOS is another Linux distribution which has the same codebase as RHEL and is freely distributed. It’s free to download and use. The only downside is that it does not have paid support. Basically you are responsible for fixing any problem you may have with your operating system. You can’t ask Red Hat or CentOS to fix them for you. So CentOS is RHEL without paid support.

There are many version of CentOS available, for example, CentOS 5, CentOS 6, CentOS 7. CentOS 7 is the latest version of CentOS and it is based on RHEL 7. CentOS 6 is an earlier version of CentOS which is based on RHEL 6, and is still supported till November 30, 2020 according to the official website of CentOS at the time of this writing. CentOS 5 and earlier is at the EOL (End of Life) and you will not get any updates or bug fixes any more.

Since you will have to fix all the problems you face while using CentOS, the version of CentOS you’re using is a must have knowledge. If you can’t tell which version of CentOS you’re using, getting help from online forums and other places would be really hard for you.

You will also need to know which version of CentOS you’re using while installing new software. For example, NodeJS has packages for CentOS 6 and CentOS 7. To install it on CentOS 6, you must follow the procedures for CentOS 6 given on the official website of NodeJS. To install it on CentOS 7, you will be following instructions for CentOS 7 the same way. Otherwise things won’t work as expected.

Now you can tell how important it is to actually know the version of CentOS you’re using. In this article, I will show you ways of checking version of your CentOS operating system. Let’s get started.

Using the cat Command:

The CentOS release information is stored in the /etc/redhat-release file on CentOS and RHEL. The easiest way to check CentOS version is to read that file with the following command:

$ cat /etc/redhat-release

As you can see, the version information is printed. I am using CentOS 7.4.

Using lsb_release Command:

You can check CentOS version with the widely used lsb_release command as well. But there is a slight problem with this command on CentOS and RHEL operating systems. The command is not available by default. Because, on CentOS and RHEL systems, the redhat-lsb-core package is not installed.

You can easily install it with the following command:

$ sudo yum install redhat-lsb-core -y

The package should be installed.

Now run the following command to check version of your CentOS operating system:

$ lsb_release -a

As you can see, the correct CentOS version is printed. I am using CentOS 7.4.

So that’s how you check the version of your CentOS operating system. Thank you for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

[Event Viewer][Log] Theo dõi và phân tích Log của Remote Desktop trên Windows

Remote Desktop Activity Log là Nhật ký hoạt động của các kết nối Remote Desktop, ghi lại những hoạt...
30/12/2020

Performance Testing [Phần 5] Hướng dẫn sử dụng Gatling Report

Một trong nhưng ưu điểm của Gatling khi đánh giá với các công cụ benchmark web khác là khả năng...
30/12/2020

[DirectAdmin] Hướng dẫn backup website lên Direct Admin (phần 4)

Direct Admin (DA) là công cụ để quản trị hosting tuyệt vời. Để nối tiếp chuỗi bài hướng dẫn...
30/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

mua Proxy riêng ở đâu, và nó đem lại lợi ích gì cho người sử dụng
22/11/2022

Hướng dẫn sử dụng Proxy Helper Fakeip khi thuê proxy
21/11/2022

PROXY NUÔI TÀI KHOẢN FACEBOOK – KINH NGHIỆM FAKE IP – THUÊ PROXY GIÁ RẺ
14/11/2022

Mua Proxy Nuôi Zalo Giá Rẻ Tại Onet.com.vn
14/11/2022

BẢNG GIÁ MUA PROXY VIỆT NAM và PROXY US Onet.com.vn
14/11/2022