linux 查看系统相关 命令
-- 查看cpu型号
[root@sun Desktop]# grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz
[root@sun Desktop]# grep "model name" /proc/cpuinfo
model name : Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz
[root@sun Desktop]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T8300 @ 2.40GHz
stepping : 6
cpu MHz : 2401.000
cache size : 3072 KB
fpu : yes
fpu_exception : yes
cpuid level : 10
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx lm constant_tsc up arch_perfmon pebs bts rep_good tsc_reliable aperfmperf unfair_spinlock pni ssse3 cx16 sse4_1 hypervisor lahf_lm ida
bogomips : 4802.00
clflush size : 64
cache_alignment : 64
address sizes : 40 bits physical, 48 bits virtual
power management:
-- 查看内存相关
[root@sun Desktop]# grep MemTotal /proc/meminfo
MemTotal: 1447420 kB
[root@sun Desktop]# free
total used free shared buffers cached
Mem: 1447420 595540 851880 0 29476 253304
-/+ buffers/cache: 312760 1134660
Swap: 2916344 0 2916344
[root@sun Desktop]# grep MemTotal /proc/meminfo
MemTotal: 1447420 kB
-- 查看操作系统位数
// 有lib64便是64位操作系统
[root@sun Desktop]# ls /
bin cgroup etc lib lost+found misc net proc sbin srv tmp var
boot dev home lib64 media mnt opt root selinux sys usr
// 直接获取位数
[root@sun Desktop]# getconf LONG_BIT
64