查看CentOS版本
| 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. |
| $ rpm -E % | RPM macro to reveal a major CentOS version |
| $ rpm --eval % | RPM macro to display a major version of CentOS |
| $ 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. |

浙公网安备 33010602011771号