美文网首页
Linux下查看系统版本号的方式

Linux下查看系统版本号的方式

作者: 逍遥_yjz | 来源:发表于2021-08-17 09:59 被阅读0次

一、查看Linux内核版本命令(两种方法):

  • 1、cat /proc/version
[root@atz ~]# cat /proc/version
Linux version 3.10.0-1160.15.2.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Feb 3 15:06:38 UTC 2021
  • 2、uname -a
[root@atz ~]# uname -a
Linux iz2zejf0fjkrh3aalbiatoz 3.10.0-1160.15.2.el7.x86_64 #1 SMP Wed Feb 3 15:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

二、查看Linux系统版本的命令(3种方法):

  • 1、lsb_release -a,即可列出所有版本信息:
[root@atz ~]# lsb_release -a
LSB Version:    :core-4.1-amd64:core-4.1-noarch
Distributor ID: CentOS
Description:    CentOS Linux release 7.9.2009 (Core)
Release:    7.9.2009
Codename:   Core

这个命令适用于所有的Linux发行版,包括Redhat、SuSE、Debian…等发行版。

  • 2、cat /etc/redhat-release,这种方法只适合Redhat系的Linux:
[root@atz ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
  • 3、cat /etc/issue,此命令也适用于所有的Linux发行版。
[root@atz ~]# cat /etc/issue
\S
Kernel \r on an \m

这个命令没啥用

相关文章

网友评论

      本文标题:Linux下查看系统版本号的方式

      本文链接:https://www.haomeiwen.com/subject/jmpbbltx.html