1818IP-服务器技术教程,云服务器评测推荐,服务器系统排错处理,环境搭建,攻击防护等

当前位置:首页 - Linux系统 - centos - 正文

君子好学,自强不息!

linux怎么查看是不是centos版本

1.cat就可以立刻知道,是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有效!

以上就是linux怎么查看是不是centos版本的详细内容,更多请关注1818ip.com其它相关文章!


本文来源:1818IP

本文地址:https://www.1818ip.com/post/1060.html

免责声明:本文由用户上传,如有侵权请联系删除!

发表评论

必填

选填

选填

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。