网创优客建站品牌官网
为成都网站建设公司企业提供高品质网站建设
热线:028-86922220
成都专业网站建设公司

定制建站费用3500元

符合中小企业对网站设计、功能常规化式的企业展示型网站建设

成都品牌网站建设

品牌网站建设费用6000元

本套餐主要针对企业品牌型网站、中高端设计、前端互动体验...

成都商城网站建设

商城网站建设费用8000元

商城网站建设因基本功能的需求不同费用上面也有很大的差别...

成都微信网站建设

手机微信网站建站3000元

手机微信网站开发、微信官网、微信商城网站...

建站知识

当前位置:首页 > 建站知识

如何查看Linux的版本信息

如何查看Linux的版本信息,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

成都创新互联专业为企业提供聊城网站建设、聊城做网站、聊城网站设计、聊城网站制作等企业网站建设、网页设计与制作、聊城企业网站模板建站服务,十余年聊城做网站经验,不只是建网站,更提供有价值的思路和整体网络服务。

 简介

Linux有很多发行版本,一般通过内核就可以判断大致的发行版本。但是如果需要详细的发行版本信息,就可以借助命令进行查看。lsb_release

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

lsb_release可以快速过滤这些信息找到自己需要的字段,这个命令有可能没有自带,可以自行安装lsb-release包就可以有了。

  1. lsb_release -h 


  1. FSG lsb_release v1.4 prints certain LSB (Linux Standard Base) and 

  2. Distribution information. 

  3.  

  4. Usage: lsb_release [OPTION]... 

  5. With no OPTION specified it is the same as -v. 

  6.  

  7. Options: 

  8.   -v, --version 

  9.     Display the version of the LSB specification against which the distribution is compliant. 

  10.   -i, --id 

  11.     Display the string id of the distributor. 

  12.   -d, --description 

  13.     Display the single line text description of the distribution. 

  14.   -r, --release 

  15.     Display the release number of the distribution. 

  16.   -c, --codename 

  17.     Display the codename according to the distribution release. 

  18.   -a, --all 

  19.     Display all of the above information. 

  20.   -s, --short 

  21.     Display all of the above information in short output format. 

  22.   -h, --help 

  23.     Display this message. 


  1. 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文件。

内核版本

查看内核版本一般都使用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

关于如何查看Linux的版本信息问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注创新互联行业资讯频道了解更多相关知识。


网站标题:如何查看Linux的版本信息
网站链接:http://bjjierui.cn/article/gooipi.html

其他资讯