这篇文章给你们分享的是有关Linux下如何查看版本信息的内容。小编感觉挺实用的,因而分享给你们做个参考手机linux操作系统64位linux,一起追随小编过来瞧瞧吧。
lsb_release
显示LSB(LinuxStandardBase)兼容的发行版本信息。若果是LSB兼容的发行版本,在/etc/lsb-release就可以查看到具体的版本信息。
Linux中查看版本信息命令介绍Linux中查看版本信息命令介绍
lsb_release可以快速过滤这种信息找到自己须要的数组linux下查看版本,这个命令有可能没有自带linux命令详解词典,可以自行安装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等linux命令查看内核版本,这种文件通常都是指向同一个文件,倘若是重新发行的版本,比如centos,就会有/etc/centos-release
Debian系列:/etc/debian-version、/etc/issue等,同样重新发行的版本也会有对应的version文件。
Linux中查看版本信息命令介绍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
谢谢诸位的阅读!关于“Linux下如何查看版本信息”这篇文章就分享到这儿了,希望以上内容可以对你们有一定的帮助linux操作系统如何样,让你们可以学到更多知识linux命令查看内核版本,假如认为文章不错linux下查看版本,可以把它分享出去让更多的人看见吧!