如何查看linux系统的发行版名称

2020-06-25 科技 125阅读
方法1:
[root@localhost var]# lsb_release -a
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.5 (Final)
Release: 6.5
Codename: Final
lsb_release这个命令适用于所有遵守LSB规范的的linux,包括Redhat、SuSE、Debian、Ubuntu、Centos等发行版。
方法2适用于Redhat/CentOS:
[root@localhost var]# cat /etc/redhat-release
CentOS release 6.5 (Final)
或者
[root@localhost var]# rpm -q centos-release
centos-release-6-5.el6.centos.11.1.x86_64
方法3:
[root@localhost var]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
另外用uname 可以查看内核版本号:
[root@localhost var]# uname -a
Linux localhost.localdomain 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
声明:你问我答网所有作品(图文、音视频)均由用户自行上传分享,仅供网友学习交流。若您的权利被侵害,请联系fangmu6661024@163.com