目录
第四步:Linux查看cpu相关信息,包括型号、主频、内核信息等
场景:最新遇到jdk版本和操作系统不兼容问题,需要查看linux版本相关信息,特意记录一下。
第一:Linux查看版本当前操作系统内核信息
[root@VM-0-6-centos /]# uname -a
Linux VM-0-6-centos 3.10.0-1127.19.1.el7.x86_64 #1 SMP Tue Aug 25 17:23:54 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
第二步:Linux查看当前操作系统版本信息
[root@VM-0-6-centos /]# cat /proc/version
Linux version 3.10.0-1127.19.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) ) #1 SMP Tue Aug 25 17:23:54 UTC 2020
第三步:Linux查看版本当前操作系统发行版信息
[root@VM-0-6-centos /]# cat /etc/redhat-release
CentOS Linux release 7.5.1804 (Core)
第四步:Linux查看cpu相关信息,包括型号、主频、内核信息等
[root@VM-0-6-centos /]# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 94
model name : Intel(R) Xeon(R) Gold 6148 CPU @ 2.40GHz
stepping : 3
microcode : 0x1
cpu MHz : 2394.376
cache size : 28160 KB
physical id : 0
siblings : 1
core id : 0
cpu cores : 1
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 mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single fsgsbase bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 arat
bogomips : 4788.75
clflush size : 64
cache_alignment : 64
address sizes : 46 bits physical, 48 bits virtual
power management:
第五步:查看linux系统位数
[root@VM-0-6-centos /]# getconf LONG_BIT
64
####或者是####
[root@VM-0-6-centos /]# file /bin/ls
/bin/ls: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=aaf05615b6c91d3cbb076af81aeff531c5d7dfd9, stripped