说说在 Linux 中如何查看系统信息

1 查看系统内核

uname -a
复制代码

输出结果:

Linux xxx 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

2 查看系统版本

cat /etc/issue
复制代码

输出结果:

Linux version 2.6.32-431.el6.x86_64 () (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Sun Nov 10 22:19:54 EST 2013

3 查看系统发行版信息

cat /etc/issue
复制代码

输出结果:

Red Hat Enterprise Linux Server release 6.5 (Santiago) Kernel on an m

4 查看 CPU 信息

cat /proc/cpuinfo

复制代码

输出结果:

processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz stepping : 2 cpu MHz : 1200.000 cache size : 15360 KB physical id : 0 siblings : 6 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 15 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid bogomips : 3791.21 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: ...

5 查看操作系统位数

getconf LONG_BIT

复制代码

输出结果:

64
1 查看系统内核 uname -a 复制代码 输出结果: Linux xxx 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux 2 查看系统版本 cat /etc/issue 复制代码 输出结果: Linux version 2.6.32-431.el6.x86_64 () (gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) ) #1 SMP Sun Nov 10 22:19:54 EST 2013 3 查看系统发行版信息 cat /etc/issue 复制代码 输出结果: Red Hat Enterprise Linux Server release 6.5 (Santiago) Kernel on an m 4 查看 CPU 信息 cat /proc/cpuinfo 复制代码 输出结果: processor : 0 vendor_id : GenuineIntel cpu family : 6 model : 63 model name : Intel(R) Xeon(R) CPU E5-2609 v3 @ 1.90GHz stepping : 2 cpu MHz : 1200.000 cache size : 15360 KB physical id : 0 siblings : 6 core id : 0 cpu cores : 6 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 15 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good xtopology nonstop_tsc aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm arat epb xsaveopt pln pts dts tpr_shadow vnmi flexpriority ept vpid fsgsbase bmi1 avx2 smep bmi2 erms invpcid bogomips : 3791.21 clflush size : 64 cache_alignment : 64 address sizes : 46 bits physical, 48 bits virtual power management: ... 5 查看操作系统位数 getconf LONG_BIT 复制代码 输出结果: 64
经验分享 程序员 微信小程序 职场和发展