查看linux系统版本信息(Oracle Linux、Centos Linux、Redhat Linux、Debian、Ubuntu)
1、cat /etc/issue,此命令也适用于所有的Linux发行版。 [root@S-CentOS home]# cat /etc/issue CentOS release 6.5 (Final) Kernel \r on an \m 2、cat /etc/redhat-release,这种方法只适合Redhat系的Linux: [root@S-CentOS home]# cat /etc/redhat-release CentOS release 6.5 (Final) 3、lsb_release -a,即可列出所有版本信息: [root@S-CentOS ~]# 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 4、hostnamectl,即可列出本机版本信息(推荐): [root@vm37925 ~]# hostnamectl Static hostname: vm37925 Pretty hostname: VM37925 Icon name: computer-vm Chassis: vm Machine ID: 5d969bf4a9488142faf59ba Boot ID: cc0274ffaa9ba97d6c440 Virtualization: kvm Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 5.13.5-1.el7.elrepo.x86_64 Architecture: x86-64
发布者:songJian 点击数:1306 发布时间:2020-09-24 23:34:39 更新时间:2023-08-18 13:02:57
正在加载评论...