如何查看linux系统内核版本_centos7内核版本

如何查看linux系统内核版本_centos7内核版本1.查看Linux系统版本cat/etc/issue或者cat/etc/redhat-release示例:[root@localhostgrafana]#cat/etc/issueCentOSrelease6.5(Final)Kernel\ronan\m2.查看Linu

大家好,又见面了,我是你们的朋友全栈君。如果您正在找激活码,请点击查看最新教程,关注关注公众号 “全栈程序员社区” 获取激活教程,可能之前旧版本教程已经失效.最新Idea2022.1教程亲测有效,一键激活。

Jetbrains全系列IDE使用 1年只要46元 售后保障 童叟无欺

目录

1.查看Linux系统版本

命令1:lsb_release -a

lsb_release解析

命令2: cat /etc/issue

命令3: cat /etc/redhat-release

2.查看Linux内核版本

命令1: uname -a

命令2: cat /proc/version

3.查看CPU个数,剩余内存,和磁盘利用

使用lscpu


​​​​​​​

1.查看Linux系统版本

命令1:lsb_release -a

该命令适用于所有Linux系统,会显示出完整的版本信息,包括Linux系统的名称,如Debian、Ubuntu、CentOS等,和对应的版本号,以及该版本的代号,例如在Debian 8中将会显示代号jessie。

[root@iZbp13nq1pxf5wki525wiuZ ~]# lsb_release -a
LSB Version:	:core-4.1-amd64:core-4.1-noarch
Distributor ID:	CentOS
Description:	CentOS Linux release 7.9.2009 (Core)
Release:	7.9.2009
Codename:	Core

lsb_release解析

显示发行版本信息

补充说明

LSB是Linux Standard Base的缩写, lsb_release命令 用来显示LSB和特定版本的相关信息。如果使用该命令时不带参数,则默认加上-v参数。

[root ~]# lsb_release --h
FSG lsb_release v2.0 prints certain LSB (Linux Standard Base) and
Distribution information.

Usage: lsb_release [OPTION]...
With no OPTION specified defaults to -v.

Options:
  -v, --version
    Display the version of the LSB specification against which the distribution is compliant.
  -i, --id
    Display the string id of the distributor.
  -d, --description
    Display the single line text description of the distribution.
  -r, --release
    Display the release number of the distribution.
  -c, --codename
    Display the codename according to the distribution release.
  -a, --all
    Display all of the above information.
  -s, --short
    Use short output format for information requested by other options (or version if none).
  -h, --help
    Display this message.

命令2: cat /etc/issue

该命令适用于所有Linux系统,显示的版本信息较为简略,只有系统名称和对应版本号。

[root ~]# cat /etc/issue
\S
Kernel \r on an \m

命令3: cat /etc/redhat-release

该命令仅适用于Redhat系列的Linux系统,显示的版本信息也较为简略。

[root ~]# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)

2.查看Linux内核版本

命令1: uname -a

[root ~]# uname -a
Linux iZbp13nq1pxf5wki525wiuZ 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

命令2: cat /proc/version

[root@iZbp13nq1pxf5wki525wiuZ ~]# cat /proc/version
Linux version 3.10.0-1160.45.1.el7.x86_64 (mockbuild@kbuilder.bsys.centos.org) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Wed Oct 13 17:20:51 UTC 2021

3.查看CPU个数,剩余内存,和磁盘利用

# 剩余内存

[root@iZ6245lpxykZ ~]# free -m
             total       used       free     shared    buffers     cached
Mem:          1841       1498        342         57         39        526
-/+ buffers/cache:        932        908
Swap:         1024          0       1024

# 查看CPU个数
[root@iZ6245lpxykZ ~]# cat /proc/cpuinfo| grep “processor”| wc -l
1

# 磁盘利用
[root@iZ6245lpxykZ ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/vda1        40G  8.3G   29G  23% /
devtmpfs        913M     0  913M   0% /dev
tmpfs           921M  1.3M  920M   1% /dev/shm
tmpfs           921M   57M  865M   7% /run
tmpfs           921M     0  921M   0% /sys/fs/cgroup
tmpfs           185M     0  185M   0% /run/user/0

使用lscpu

[root@iZj6c7q37rfjtps4h88ieoZ ~]# cat /proc/cpuinfo| grep "processor"| wc -l
4
[root@iZj6c7q37rfjtps4h88ieoZ ~]# lscpu
Architecture:        x86_64
CPU op-mode(s):      32-bit, 64-bit
Byte Order:          Little Endian
CPU(s):              4
On-line CPU(s) list: 0-3
Thread(s) per core:  2
Core(s) per socket:  2
Socket(s):           1
NUMA node(s):        1
Vendor ID:           GenuineIntel
CPU family:          6
Model:               85
Model name:          Intel(R) Xeon(R) Platinum 8269CY CPU @ 2.50GHz
Stepping:            7
CPU MHz:             2499.998
BogoMIPS:            4999.99
Hypervisor vendor:   KVM
Virtualization type: full
L1d cache:           32K
L1i cache:           32K
L2 cache:            1024K
L3 cache:            36608K
NUMA node0 CPU(s):   0-3
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 nonstop_tsc cpuid tsc_known_freq pni pclmulqdq monitor ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat avx512_vnni

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/172297.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • long long转string代码

    long long转string代码stringlltoString(longlongtimestamp){stringresult;ostringstreamss;ss<<timestamp;istringstreamis(ss.str());is>>result;returnresult;}包含头文件:#include…

  • redis是单线程还是多线程,有哪些特点(linux多线程面试题)

    0.redis单线程问题单线程指的是网络请求模块使用了一个线程(所以不需考虑并发安全性),即一个线程处理所有网络请求,其他模块仍用了多个线程。1.为什么说redis能够快速执行(1)绝大部分请求是纯粹的内存操作(非常快速)(2)采用单线程,避免了不必要的上下文切换和竞争条件(3)非阻塞IO-IO多路复用2.redis的内部实现 内部实现采用epoll,采用了epoll+自己…

  • matlab 图像填充斜线_怎么更改柱形图的填充

    matlab 图像填充斜线_怎么更改柱形图的填充针对这种情况,MATLAB提供了若干特殊图形绘制函数。接下来主要介绍特殊图形的绘制方法,主要图形包括:条形图、区域图、饼状图、柱状图、离散图、罗盘图、羽毛图、……针对这种情况,MATLAB提供了若干特殊图形绘制函数。接下来主要介绍特殊图形的绘制方法,主要图形包括:条形图、区域图、饼状图、柱状图、离散图、罗盘图、羽毛图、……[0,7,-2,2]);MATLAB提供的统计…

    2022年10月19日
  • 20222.5idea激活码-激活码分享

    (20222.5idea激活码)最近有小伙伴私信我,问我这边有没有免费的intellijIdea的激活码,然后我将全栈君台教程分享给他了。激活成功之后他一直表示感谢,哈哈~IntelliJ2021最新激活注册码,破解教程可免费永久激活,亲测有效,下面是详细链接哦~https://javaforall.cn/100143.html40…

  • 群晖docker使用教程_docker的使用

    群晖docker使用教程_docker的使用概括Docker与传统虚拟机的区别与传统虚拟机的区别Docker的安装的安装Dockerdaemon,client,containerd镜像与容器操作容器运行配置Docker网络配置网络配置AlpineDockerImage制作自己的DockerImageDocker安全性问题安全性问题Dock

  • p6spy mysql8_P6Spy配置使用

    p6spy mysql8_P6Spy配置使用P6Spy是一个可以用来在应用程序中拦截和修改数据操作语句的开源框架。通过P6Spy我们可以对SQL语句进行拦截,相当于一个SQL语句的记录器,这样我们可以用它来作相关的分析,比如性能分析。P6SPY提供了如下几个功能:记录SQL语句的执行时间戳。记录SQL语句类型记录SQL填入参数的和没有填入参数的SQL语句根据配置的时间控制SQL语句的执行时间,对超出时间的SQL语句输出到日志文件中下面是p…

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号