查看 Linux 系统信息

来源:互联网 发布:小区网络监控系统方案 编辑:程序博客网 时间:2024/06/06 03:25
查看 Linux 系统信息
查看 Linux 发行版信息
uname -a 查看详细系统信息
uname 查看系统类型
uname -r 查看版本
cat /proc/version
file /bin/ls
查看发行版信息:
cat /etc/issue
cat /etc/redhat-release 仅适用于RedHat、CentOS
系统位数:
getconf LONG_BIT


[root@VPS ~]# uname -r
2.6.32-504.el6.x86_64
[root@VPS ~]#
[root@VPS ~]#
[root@VPS ~]# uname -a
Linux VPS 2.6.32-504.el6.x86_64 #1 SMP Wed Oct 15 04:27:16 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
[root@VPS ~]#
[root@VPS ~]#
[root@VPS ~]# getconf LONG_BIT
64
[root@VPS ~]#
[root@VPS ~]# cat /etc/issue
CentOS release 6.6 (Final)
Kernel \r on an \m
[root@VPS ~]#
[root@VPS ~]#
[root@VPS ~]# cat /proc/version
Linux version 2.6.32-504.el6.x86_64 (mockbuild@c6b9.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Wed Oct 15 04:27:16 UTC 2014
[root@VPS ~]#
[root@VPS ~]#
[root@VPS ~]# cat /etc/redhat-release
CentOS release 6.6 (Final)
[root@VPS ~]#
[root@VPS ~]#
[root@VPS ~]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, stripped
[root@VPS ~]#
[root@VPS ~]#



参考中号称通用的 lsb_release 命令并没有默认安装:
[root@VPS ~]# lsb_release -a
-bash: lsb_release: command not found
[root@VPS ~]# yum list | grep lsb
redhat-lsb.i686 4.0-7.el6.centos base
redhat-lsb.x86_64 4.0-7.el6.centos base
redhat-lsb-compat.i686 4.0-7.el6.centos base
redhat-lsb-compat.x86_64 4.0-7.el6.centos base
redhat-lsb-core.i686 4.0-7.el6.centos base
redhat-lsb-core.x86_64 4.0-7.el6.centos base
redhat-lsb-graphics.i686 4.0-7.el6.centos base
redhat-lsb-graphics.x86_64 4.0-7.el6.centos base
redhat-lsb-printing.i686 4.0-7.el6.centos base
redhat-lsb-printing.x86_64 4.0-7.el6.centos base
[root@VPS ~]#
[root@VPS ~]#



参考:
查看centos系统版本命令centos
http://www.centoscn.com/CentOS/help/2015/0311/4853.html
查看CentOS版本方法 - 智慧云端日记 - 博客园
http://www.cnblogs.com/zyw-205520/p/4900689.html
file命令_Linux file 命令用法详解:用来探测给定文件的类型。
http://man.linuxde.net/file
LSB 简介
https://www.ibm.com/developerworks/cn/linux/l-lsb-intr/







0 0