Linux(CentOS)查看系统版本

1. Linux系统版本

  • 这种方法只适合Redhat系的Linux
cat /etc/redhat-release

CentOS Linux release 7.9.2009 (Core)

  • 所有版本信息。这个命令适用于所有的Linux发行版,包括RedHat、SUSE、Debian…等发行版。
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

  • 此命令也适用于所有的Linux发行版
cat /etc/issue

\S
Kernel \r on an \m​

2. Linux内核版本命令

cat /proc/version

Linux version 3.10.0-1160.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Mon Oct 19 16:18:59 UTC 2020

uname -a

Linux localhost.localdomain 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

猜你喜欢

转载自blog.csdn.net/lishuoboy/article/details/130629269