当前位置: 代码网 > 服务器>服务器>Linux > 查看Linux OS内核与版本的几种命令分享

查看Linux OS内核与版本的几种命令分享

2024年11月30日 Linux 我要评论
查看linux os内核与版本的几种命令方法一[root@localhost ~]# cat /etc/os-releasename="openeuler"version="23.03"id="ope

查看linux os内核与版本的几种命令

方法一

[root@localhost ~]# cat /etc/os-release
name="openeuler"
version="23.03"
id="openeuler"
version_id="23.03"
pretty_name="openeuler 23.03"
ansi_color="0;31"

方法二

[root@localhost ~]# cat /proc/version
linux version 6.1.19-7.0.0.17.oe2303.x86_64 (root@dc-64g.compass-ci) (gcc_old (gcc) 10.3.1, gnu ld (gnu binutils) 2.37) #1 smp preempt_dynamic tue mar 28 00:01:02 cst 2023

方法三

[root@localhost ~]# uname -a
linux localhost.localdomain 6.1.19-7.0.0.17.oe2303.x86_64 #1 smp preempt_dynamic tue mar 28 00:01:02 cst 2023 x86_64 x86_64 x86_64 gnu/linux
[root@localhost ~]#

方法四

#需要系统有包支持,没有的话需要联网安装,如下所示
[root@ss /]# lsb_release -a
bash: lsb_release: command not found...
install package 'redhat-lsb-core' to provide command 'lsb_release'? [n/y] y


 * waiting in queue...
 * loading list of packages....
the following packages have to be installed:
 esmtp-1.2-15.el8.x86_64        user configurable send-only mail transfer agent
 libesmtp-1.0.6-18.el8.x86_64   smtp client library
 liblockfile-1.14-1.el8.x86_64  this implements a number of functions found in -lmail on sysv systems
 m4-1.4.18-7.el8.x86_64 the gnu macro processor
 mailx-12.5-29.el8.x86_64       enhanced implementation of the mailx command
 ncurses-compat-libs-6.1-9.20180224.el8.x86_64  ncurses compatibility libraries
 patch-2.7.6-11.el8.x86_64      utility for modifying/upgrading files
 redhat-lsb-core-4.1-47.el8.x86_64      lsb core module support
 redhat-lsb-submod-security-4.1-47.el8.x86_64   lsb security submodule support
 spax-1.5.3-13.el8.x86_64       portable archive exchange
proceed with changes? [n/y] y


 * waiting in queue...
 * waiting for authentication...
 * waiting in queue...
 * downloading packages...
 * requesting data...
 * testing changes...
 * installing packages...
lsb version:    :core-4.1-amd64:core-4.1-noarch
distributor id: centos
description:    centos linux release 8.4.2105
release:        8.4.2105
codename:       n/a

[root@ss /]# lsb_release -a
lsb version:    :core-4.1-amd64:core-4.1-noarch
distributor id: centos
description:    centos linux release 8.4.2105
release:        8.4.2105
codename:       n/a

总结

以上为个人经验,希望能给大家一个参考,也希望大家多多支持代码网。

(0)

相关文章:

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

发表评论

验证码:
Copyright © 2017-2025  代码网 保留所有权利. 粤ICP备2024248653号
站长QQ:2386932994 | 联系邮箱:2386932994@qq.com