查看Linux OS內(nèi)核與版本的幾種命令分享
更新時間:2024年11月29日 14:29:26 作者:零時搞學(xué)習(xí)
文章總結(jié)了四種在Linux操作系統(tǒng)中查看內(nèi)核和版本的方法,并強調(diào)了個人經(jīng)驗的價值,鼓勵大家參考和使用
查看Linux OS內(nèi)核與版本的幾種命令
方法一
[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 ~]#
方法四
#需要系統(tǒng)有包支持,沒有的話需要聯(lián)網(wǎng)安裝,如下所示 [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
總結(jié)
以上為個人經(jīng)驗,希望能給大家一個參考,也希望大家多多支持腳本之家。
相關(guān)文章
在Linux分區(qū)或邏輯卷中創(chuàng)建文件系統(tǒng)的方法
這篇文章主要給大家介紹了關(guān)于如何在Linux分區(qū)或邏輯卷中創(chuàng)建文件系統(tǒng)的相關(guān)資料,文中通過示例代碼介紹的非常詳細,對大家學(xué)習(xí)或者使用Linux具有一定的參考學(xué)習(xí)價值,需要的朋友們下面來一起學(xué)習(xí)學(xué)習(xí)吧2019-04-04
PHP程序員玩轉(zhuǎn)Linux系列 搭建FTP代碼開發(fā)環(huán)境
這篇文章主要為大家詳細介紹了PHP程序員玩轉(zhuǎn)Linux系列文章,F(xiàn)TP代碼開發(fā)環(huán)境搭建教程,具有一定的參考價值,感興趣的小伙伴們可以參考一下2017-04-04
Linux監(jiān)控系統(tǒng)網(wǎng)絡(luò)流量的工具大全
在當今高度互聯(lián)的世界中,網(wǎng)絡(luò)流量監(jiān)控已成為系統(tǒng)運維、安全審計和性能優(yōu)化的重要組成部分,Linux作為廣泛部署的操作系統(tǒng),提供了豐富多樣的工具和接口用于監(jiān)控網(wǎng)絡(luò)流量,本文將深入探討這些工具,需要的朋友可以參考下2026-03-03
詳解為新版Apache服務(wù)器開啟HTTP/2支持的方法
這篇文章主要介紹了在Apache服務(wù)器中開啟HTTP/2的方法,HTTP/2被稱為未來的新HTTP協(xié)議,需要的朋友可以參考下2015-12-12
如何創(chuàng)建Linux的swap交換分區(qū)文件的方法步驟
這篇文章主要介紹了如何創(chuàng)建Linux的swap交換分區(qū)文件的方法步驟,小編覺得挺不錯的,現(xiàn)在分享給大家,也給大家做個參考。一起跟隨小編過來看看吧2019-03-03
Linux服務(wù)器配置ip白名單防止遠程登錄以及端口暴露的問題
今天小編就為大家分享一篇Linux服務(wù)器配置ip白名單防止遠程登錄以及端口暴露的問題,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2019-07-07
在Ubuntu Server上使用Samba共享`/data`目錄過程
在Linux與Windows混合環(huán)境中,本文詳細介紹了如何在Ubuntu Server上配置Samba,實現(xiàn)/data目錄的文件共享,滿足日常文件共享與數(shù)據(jù)交換需求,通過簡單直接的配置步驟,Windows用戶可以方便地訪問與操作該共享目錄2026-05-05
linux使用QQ實現(xiàn)網(wǎng)絡(luò)郵件報警功能
這篇文章主要介紹了linux使用QQ實現(xiàn)網(wǎng)絡(luò)郵件報警功能,本文圖文并茂給大家介紹的非常詳細,具有一定的參考借鑒價值,需要的朋友可以參考下2019-08-08

