1、cat /proc/version
显示正在运行的内核版本。
[root@S-CentOS home]# cat /proc/version
Linux version 2.6.32-431.el6.x86_64 (mockbuild@c6b8.bsys.dev.centos.org) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Fri Nov 22 03:15:09 UTC 2013
2、uname -a
显示电脑以及操作系统的相关信息。
[root@S-CentOS home]# uname -a
Linux S-CentOS 2.6.32-431.el6.x86_64 #1 SMP Fri Nov 22 03:15:09 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
check Linux version
1、lsb_release -a,即可列出所有版本信息
[root@S-CentOS ~]# 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发行版,包括RedHat、SUSE、Debian…等发行版,但是在debian下要安装lsb。
2、cat /etc/redhat-release,这种方法只适合Redhat系的Linux
[root@S-CentOS home]# cat /etc/redhat-release
CentOS release 6.5 (Final)
3、cat /etc/issue,此命令也适用于所有的Linux发行版
显示的是发行版本信息。
[root@S-CentOS home]# cat /etc/issue
CentOS release 6.5 (Final)
Kernel \r on an \m
1、 cat /proc/cpuinfo (Linux查看cpu相关信息,包括型号、主频、内核信息等)
processor : 0
vendor_id : AuthenticAMD
cpu family : 15
model : 1
model name : AMD A4-3300M APU with Radeon™ HD Graphics
stepping : 0
cpu MHz : 1896.236
cache size : 1024 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 6
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr
sse sse2 syscall mmxext lm 3dnowext 3dnow
bogomips : 3774.87
check ip address in Linux