以下适用情况为实际测试情况,以后会不断更新。
【方法一】
查看主机名,操作系统内核,架构信息(CentOS/…)
[root@localhost /]# uname -a
Linux localhost.localdomain 2.6.18-164.el5 #1 SMP Thu Sep 3 03:28:30 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
【方法二】
查看操作系统内核及其编译信息(CentOS/…)
[root@localhost /]# cat /proc/version
Linux version 2.6.18-164.el5 (mockbuild@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-46)) #1 SMP Thu Sep 3 03:28:30 EDT 2009
【方法三】
查看LSB信息、系统版本信息(CentOS/…)
[root@localhost /]# lsb_release -a
LSB Version: :core-3.1-amd64:core-3.1-ia32:core-3.1-noarch:graphics-3.1-amd64:graphics-3.1-ia32:graphics-3.1-noarch
Distributor ID: CentOS
Description: CentOS release 5.4 (Final)
Release: 5.4
Codename: Final
【方法四】
查看系统版本简略信息(CentOS/…)
[root@localhost /]# cat /etc/issue
CentOS release 5.4 (Final)
【方法五】
查看32位或64位系统(CentOS/…)
[root@localhost /]# getconf LONG_BIT
64
【方法六】
查看CPU详细信息(CentOS/…)
[root@localhost /]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 58
model name : Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz
…
【参考】
http://www.cnblogs.com/lanxuezaipiao/archive/2012/10/22/2732857.html
http://jingyan.baidu.com/article/7908e85c725159af481ad2f7.html