先安装lsb
命令是yum install lsb
1、lsb_release -a 查看系统版本
[root@localhost bin]# lsb_release -a
LSB Version: :core-4.1-amd64:core-4.1-noarch:cxx-4.1-amd64:cxx-4.1-noarch:desktop-4.1-amd64:desktop-4.1-noarch:languages-4.1-amd64:languages-4.1-noarch:printing-4.1-amd64:printing-4.1-noarch
Distributor ID: CentOS
Description: CentOS Linux release 7.5.1804 (Core)
Release: 7.5.1804
Codename: Core
2、uname -a :显示系统名、节点名称、操作系统的发行版号、操作系统版本、运行系统的机器 ID 号。
[root@localhost bin]# uname -a
Linux localhost.localdomain 3.10.0-862.11.6.el7.x86_64 #1 SMP Tue Aug 14 21:49:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
本文介绍了如何在CentOS系统中使用lsb_release和uname命令来查看详细的系统版本信息。通过安装lsb并运行lsb_release -a命令可以获取Linux标准基准(LSB)版本和系统发行版详情;而uname -a则提供了内核版本、主机名等更多信息。
1712

被折叠的 条评论
为什么被折叠?



