Checking an older CentOS server?
This guide helps identify an existing installation. CentOS Linux 7 reached end of life on 30 June 2024, and CentOS Linux 8 on 31 December 2021. These dates refer to CentOS Linux, not every CentOS Stream release. See the CentOS Project lifecycle comparison before planning ongoing use.
There are several ways on how to check what version of CentOS is running on your system. The simplest way to check for the CentOS version number is to execute the:
cat /etc/centos-release
What is the command to check CentOS version?
The following table contains most common and recommended ways on how to check CentOS version on your CentOS Linux server or desktop.
| Command | Description |
|---|---|
| $ rpm -q centos-release | CentOS version valid for CentOS 6 and higher. Causes to reveal major, minor and asynchronous CentOS version. |
| $ lsb_release -d | Requires redhat-lsb package to be installed before execution. |
| $ cat /etc/centos-release | Linux cat command to output content of the /etc/centos-release to query CentOS version. Works with CentOS 6 and higher. |
Planning your next hosting environment
Record the operating system version, applications and backup requirements before planning a move. Compare HillHost VPS hosting options and ask our team to confirm application compatibility and the available operating systems before ordering. A version check alone does not confirm that a server is supported or ready to migrate.
