前言
很多时候,我们需要下载软件的时候,必须要知道我们使用的Linux系统是什么版本,32还是64位等等,可以使用最简单的命令查看:uname -a
当然还有其他命令可以查看更详细的信息,见下文.
Linux下如何查看版本信息, 包括位数、版本信息以及CPU内核信息、CPU具体型号等等,整个CPU信息一目了然。
1、# uname -a (Linux查看版本当前操作系统内核信息)
Linux hao-PC 4.15.0-21deepin-generic #21 SMP Mon May 21 05:20:09 UTC 2018 x86_64 GNU/Linux
2、# cat /proc/version (Linux查看当前操作系统版本信息)
Linux version 4.15.0-21deepin-generic (pbuilder@gs-PC) (gcc version 7.2.0 (Debian 7.2.0-20)) #21 SMP Mon May 21 05:20:09 UTC 2018
这个和uname -a 大同小异
3、# cat /etc/issue 或cat /etc/redhat-release(Linux查看版本当前操作系统发行版信息)
Deepin GNU/Linux 15.6
4、# cat /proc/cpuinfo (Linux查看cpu相关信息,包括型号、主频、内核信息等)
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
stepping : 10
microcode : 0xa07
cpu MHz : 1982.780
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 0
cpu cores : 2
apicid : 0
initial apicid : 0
fpu : yes
fpu_exception : yes
cpuid level : 13
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 lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti dtherm
bugs : cpu_meltdown spectre_v1 spectre_v2
bogomips : 4388.90
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
power management:
processor : 1
vendor_id : GenuineIntel
cpu family : 6
model : 23
model name : Intel(R) Core(TM)2 Duo CPU T6600 @ 2.20GHz
stepping : 10
microcode : 0xa07
cpu MHz : 1789.904
cache size : 2048 KB
physical id : 0
siblings : 2
core id : 1
cpu cores : 2
apicid : 1
initial apicid : 1
fpu : yes
fpu_exception : yes
cpuid level : 13
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 lm constant_tsc arch_perfmon pebs bts rep_good nopl cpuid aperfmperf pni dtes64 monitor ds_cpl est tm2 ssse3 cx16 xtpr pdcm sse4_1 xsave lahf_lm pti dtherm
bugs : cpu_meltdown spectre_v1 spectre_v2
bogomips : 4388.90
clflush size : 64
cache_alignment : 64
address sizes : 36 bits physical, 48 bits virtual
5、# getconf LONG_BIT (Linux查看版本说明当前CPU运行在32bit模式下, 但不代表CPU不支持64bit)
64
6、# lsb_release -a
Linux下lsb_release命令可以显示LSB和特定版本的一些信息,LSB是Linux Standard Base的缩写,lsb_release命令用来显示LSB和特定版本的相关信息。如果使用该命令时不带参数,则默认加上-v参数。
参考文章:
https://www.cnblogs.com/YangJieCheng/p/5907166.html