查看linux版本的三種常用方法 1) 登錄到服務(wù)器執(zhí)行 lsb_release -a ,即可列出所有版本信息,例如: [[email protected] ~]# lsb_release -a LSB Version: 1.3 Distributor ID: RedHatEnterpriseAS Description: Red Hat Enterprise Linux AS release 4 (Nahant Update 1) Release: 4 Codename: NahantUpdate1 [[email protected] ~]# 這個(gè)命令適用于所有的linux,包括Redhat、SuSE、Debian等發(fā)行版。 2) 登錄到linux執(zhí)行cat /etc/redhat-release ,例如如下: [[email protected] ~]# cat /etc/redhat-release Red Hat Enterprise Linux AS release 4 (Nahant Update 1) [[email protected] ~]# 這種方式下可以直接看到具體的版本號(hào),比如 AS4 Update 1 3)登錄到linux執(zhí)行rpm -q redhat-release ,例如如下 [[email protected] ~]# rpm -q redhat-release redhat-release-4AS-2.4 [[email protected] ~]# 這種方式下可看到一個(gè)所謂的release號(hào),比如上邊的例子是2.4 這個(gè)release號(hào)和實(shí)際的版本之間存在一定的對(duì)應(yīng)關(guān)系,如下: redhat-release-3AS-1 -> Redhat Enterprise Linux AS 3 redhat-release-3AS-7.4 -> Redhat Enterprise Linux AS 3 Update 4 redhat-release-4AS-2 -> Redhat Enterprise Linux AS 4 redhat-release-4AS-2.4 -> Redhat Enterprise Linux AS 4 Update 1 redhat-release-4AS-3 -> Redhat Enterprise Linux AS 4 Update 2 redhat-release-4AS-4.1 -> Redhat Enterprise Linux AS 4 Update 3 redhat-release-4AS-5.5 -> Redhat Enterprise Linux AS 4 Update 4 注意:第(2)(3)兩種方法只對(duì)Redhat Linux有效 以上查看linux版本的三種常用方法就是小編為大家收集整理的全部?jī)?nèi)容了,希望對(duì)大家有所幫助。如果您喜歡這篇文章,可以收藏或分享給您的小伙伴們吧!歡迎持續(xù)關(guān)注我們的后續(xù)更新。 |
免責(zé)聲明:本站部分文章和圖片均來(lái)自用戶投稿和網(wǎng)絡(luò)收集,旨在傳播知識(shí),文章和圖片版權(quán)歸原作者及原出處所有,僅供學(xué)習(xí)與參考,請(qǐng)勿用于商業(yè)用途,如果損害了您的權(quán)利,請(qǐng)聯(lián)系我們及時(shí)修正或刪除。謝謝!
始終以前瞻性的眼光聚焦站長(zhǎng)、創(chuàng)業(yè)、互聯(lián)網(wǎng)等領(lǐng)域,為您提供最新最全的互聯(lián)網(wǎng)資訊,幫助站長(zhǎng)轉(zhuǎn)型升級(jí),為互聯(lián)網(wǎng)創(chuàng)業(yè)者提供更加優(yōu)質(zhì)的創(chuàng)業(yè)信息和品牌營(yíng)銷服務(wù),與站長(zhǎng)一起進(jìn)步!讓互聯(lián)網(wǎng)創(chuàng)業(yè)者不再孤獨(dú)!
掃一掃,關(guān)注站長(zhǎng)網(wǎng)微信