<menu id="ycqsw"></menu><nav id="ycqsw"><code id="ycqsw"></code></nav>
<dd id="ycqsw"><menu id="ycqsw"></menu></dd>
  • <nav id="ycqsw"></nav>
    <menu id="ycqsw"><strong id="ycqsw"></strong></menu>
    <xmp id="ycqsw"><nav id="ycqsw"></nav>
  • linux查看系統版本命令(如何查看linux系統版本)


    簡介

    Linux有很多發行版本,一般通過內核就可以判斷大致的發行版本。但是如果需要詳細的發行版本信息,就可以借助命令進行查看。

    Linux 查看版本信息

    lsb_release

    顯示LSB(Linux Standard Base)兼容的發行版本信息。如果是LSB兼容的發行版本,在/etc/lsb-release就可以查看到具體的版本信息。

    Linux 查看版本信息

    lsb_release可以快速過濾這些信息找到自己需要的字段,這個命令有可能沒有自帶,可以自行安裝lsb-release包就可以有了。

    lsb_release -h
    FSG lsb_release v1.4 prints certain LSB (Linux Standard Base) and
    Distribution information.
    
    Usage: lsb_release [OPTION]...
    With no OPTION specified it is the same as -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
     ?  Display all of the above information in short output format.
     ?-h, --help
     ?  Display this message.
     lsb_release -a
    LSB Version:    n/a
    Distributor ID: ManjaroLinux
    Description:    Manjaro Linux
    Release:    21.0.2
    Codename:   Ornara

    Version文件

    lsb_release這個命令需要有另外安裝,如果沒有安裝也可以通過其他的版本信息文件找到版本的信息。

    RHEL系列:/etc/redhat-release、/etc/os-release、/etc/system-release 等,這些文件一般都是指向同一個文件,如果是重新發行的版本,例如centos,還會有/etc/centos-release

    Debian系列:/etc/debian-version、/etc/issue等,同樣重新發行的版本也會有對應的version文件。

    Linux 查看版本信息

    內核版本

    查看內核版本一般都使用uname這個命令。

    uname -a
    Linux manjaro 5.11.14-1-MANJARO #1 SMP PREEMPT Wed Apr 14 08:25:29 UTC 2021 x86_64 GNU/Linux

    用這個命令也可以快速過濾到自己需要的字段。

    也可以直接查看/proc/version來查看當前云中的內核版本

    cat /proc/version
    Linux version 5.11.14-1-MANJARO (builduser@LEGION) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) 2.36.1) #1 SMP PREEMPT Wed Apr 14 08:25:29 UTC 2021

    版權聲明:本文內容由互聯網用戶自發貢獻,該文觀點僅代表作者本人。本站僅提供信息存儲空間服務,不擁有所有權,不承擔相關法律責任。如發現本站有涉嫌抄襲侵權/違法違規的內容, 請發送郵件至 舉報,一經查實,本站將立刻刪除。

    發表評論

    登錄后才能評論
    国产精品区一区二区免费