本文摘自PHP中文网,作者(*-*)浩,侵删。

这里所谓的Linux版本信息,包括Linux内核版本信息和Linux系统版本信息。
一、查看Linux内核版本信息 (推荐学习:linux教程)
方法1:登陆Linux,在终端输入 cat /proc/version
1 2 | [root@localhost ~]# cat /proc/version
Linux version 3.10.0-957.el7.x86_64 (mockbuild@x86-040.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Thu Oct 4 20:48:51 UTC 201
|
方法2:登陆Linux,在终端输入 uname -a
1 2 | [root@localhost ~]# uname -a
Linux localhost 3.10.0-957.el7.x86_64 #1 SMP Thu Oct 4 20:48:51 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
|
方法3:登陆Linux,在终端输入 uname -r
1 2 | [root@localhost ~]# uname -r
3.10.0-957.el7.x86_64
|
二、查看Linux系统版本信息
方法1:登陆Linux,在终端输入 cat /etc/issue
1 2 | [root@localhost ~]# cat /etc/issue
\SKernel \r on an \m
|
方法2:登陆Linux,在终端输入 cat /etc/redhat-release
1 2 | [root@localhost ~]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.6 (Maipo)
|
方法3:登陆Linux,在终端输入 lsb_release -a
1 2 3 4 5 6 | [root@localhost ~]# 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: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 7.6 (Maipo)
Release: 7.6
Codename: Maip
|
以上就是如何查看linux信息的详细内容,更多文章请关注木庄网络博客!
相关阅读 >>
Linux下的软件防火墙iptables――规则的定义与删除
Linux下ip地址访问不到怎么办
怎么查看Linux版本信息
如何寻找想要的vim插件
Linux查看空间大小
Linux和unix的区别
ros系统和Linux的区别是什么
Linux文件权限有哪些
Linux中如何配置ftp服务器
如何使用e-hpc创建超级计算集群(scc)faq
更多相关阅读请进入《Linux》频道 >>
转载请注明出处:木庄网络博客 » 如何查看linux信息