四种Linux系统版本号的查看方式

编程知识 行业动态 更新时间:2024-06-13 00:20:39

目录

1、系统版本号的查看(cat /proc/version)

2、获取内核信息 (uname -a)

3、获取系统信息 (cat /etc/os-release)

4、获取系统信息 (cat /etc/redhat-release)


1、系统版本号的查看(cat /proc/version)

[root@qianfeng01 ~]# cat /proc/version
Linux version 3.10.0-1062.el7.x86_64 (mockbuild@kbuilder.bsys.centos) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Wed Aug 7 18:08:02 UTC 2019

2、获取内核信息 (uname -a)

[root@qianfeng01 ~]# uname -a
Linux qianfeng01 3.10.0-1062.el7.x86_64 #1 SMP Wed Aug 7 18:08:02 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

3、获取系统信息 (cat /etc/os-release)

[root@qianfeng01 ~]# cat /etc/os-release
NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:7"
HOME_URL="https://www.centos/"
BUG_REPORT_URL="https://bugs.centos/"

CENTOS_MANTISBT_PROJECT="CentOS-7"
CENTOS_MANTISBT_PROJECT_VERSION="7"
REDHAT_SUPPORT_PRODUCT="centos"
REDHAT_SUPPORT_PRODUCT_VERSION="7"

4、获取系统信息 (cat /etc/redhat-release

[root@qianfeng01 ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

hostnamectl

[root@qianfeng01 ~]# hostnamectl
   Static hostname: qianfeng01
         Icon name: computer-vm
           Chassis: vm
        Machine ID: dce68bacb80a4cf5bca2405780aa9591
           Boot ID: 27f089e32abf48a0a903bd5671d31586
    Virtualization: vmware
  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-1062.el7.x86_64
      Architecture: x86-64

 

更多推荐

四种Linux系统版本号的查看方式

本文发布于:2023-03-30 08:12:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/b437c8786d49c78bdfd8e03906c05965.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:四种   版本号   方式   系统   Linux

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!