linux oracle 查看版本号,Linux系统如何查看版本信息

该博客详细展示了如何在Linux系统中通过命令行工具获取操作系统内核、版本、发行版、CPU以及所有版本信息。包括使用`uname -a`、`cat /proc/version`、`cat /etc/issue`、`cat /proc/cpuinfo`和`lsb_release -a`等命令。在未安装`lsb_release`的情况下,通过`yum install -y redhat-lsb`进行安装以获取完整版本信息。

1、查看当前操作系统内核信息

uname -a

[root@ihdemj0ovr /]# uname -a

Linux ihdemj0ovr 3.10.0-957.21.3.el7.x86_64 #1 SMP Tue Jun 18 16:35:19 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

2、查看当前操作系统版本信息

cat /proc/version

[root@ihdemj0ovr /]# cat /proc/version

Linux version 3.10.0-957.21.3.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-36) (GCC) ) #1 SMP Tue Jun 18 16:35:19 UTC 2019

3、查看当前操作系统发行版信息

cat /etc/issue 或 cat /etc/redhat-release

[root@ihdemj0ovr /]# cat /etc/issue

S

Kernel r on an m

[root@ihdemj0ovr /]# cat /etc/redhat-release

CentOS Linux release 7.6.1810 (Core)

4、查看cpu相关信息,包括型号、主频、内核信息等

cat /proc/cpuinfo

[root@ihdemj0ovr /]# cat /etc/redhat-release

CentOS Linux release 7.6.1810 (Core)

[root@ihdemj0ovr /]# cat /proc/cpuinfo

processor : 0

vendor_id : GenuineIntel

cpu family : 6

model : 79

model name : Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz

stepping : 1

microcode : 0x1

cpu MHz : 2500.028

cache size : 40960 KB

physical id : 0

siblings : 2

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 ht 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 ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt spec_ctrl intel_stibp

bogomips : 5000.05

clflush size : 64

cache_alignment : 64

address sizes : 46 bits physical, 48 bits virtual

power management:

processor : 1

vendor_id : GenuineIntel

cpu family : 6

model : 79

model name : Intel(R) Xeon(R) CPU E5-2682 v4 @ 2.50GHz

stepping : 1

microcode : 0x1

cpu MHz : 2500.028

cache size : 40960 KB

physical id : 0

siblings : 2

core id : 0

cpu cores : 1

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 mmx fxsr sse sse2 ss ht 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 ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm rdseed adx smap xsaveopt spec_ctrl intel_stibp

bogomips : 5000.05

clflush size : 64

cache_alignment : 64

address sizes : 46 bits physical, 48 bits virtual

power management:

5、列出所有版本信息

lsb_release -a

[root@ihdemj0ovr /]# lsb_release -a

LSB Version: :core-4.1-amd64:core-4.1-noarch

Distributor ID: CentOS

Description: CentOS Linux release 7.6.1810 (Core)

Release: 7.6.1810

Codename: Core

[root@ihdemj0ovr /]# lsb_release -a

-bash: lsb_release: command not found

出现command not found说明没安装lsb_realease,可以执行命令yum install -y redhat-lsb安装lsb_realease,安装完成后,版本信息如下:

[root@ihdemj0ovr /]# lsb_release -a

LSB Version: :core-4.1-amd64:core-4.1-noarch

Distributor ID: CentOS

Description: CentOS Linux release 7.6.1810 (Core)

Release: 7.6.1810

Codename: Core

评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值