方法:1、利用“cat /etc/issue”命令显示发行版本信息;2、利用“lsb_release -a”命令显示LSB和特定版本信息;3、利用“cat /etc/redhat-release”命令显示Redhat Linux版本信息。
本文操作环境:centos 6.5系统、Dell G3电脑。
1、一行很简单的命令,就可以让立刻知道,是centos还是ubuntu,还是debian。
[root@test ~]#cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m BashCopy
2、登录到服务器执行 lsb_release -a 即可列出所有版本信息
LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息。
如下:
[root@test ~]# lsb_release -a LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:graphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch Distributor ID: CentOS Description: CentOS release 6.5 (Final) Release: 6.5 Codename: Final BashCopy
注: 这个命令适用于所有的linux,包括Redhat、SuSE、Debian等发行版。
3、登录到linux执行 cat /etc/redhat-release
[root@test ~]# cat /etc/redhat-release CentOS release 6.5 (Final) BashCopy
注:这种方式下可以直接看到具体的版本号,比如 AS4 Update 1。 只对 Redhat Linux有效!
推荐教程:《centos教程》
以上就是linux怎么查看是不是centos版本的详细内容,更多请关注php中文网其它相关文章!
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号