Linux下如何查看版本信息

目录

第一:Linux查看版本当前操作系统内核信息

第二步:Linux查看当前操作系统版本信息

第三步:Linux查看版本当前操作系统发行版信息

第四步:Linux查看cpu相关信息,包括型号、主频、内核信息等

第五步:查看linux系统位数


场景:最新遇到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

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值