Linux中如何查看版本信息?本篇文章重点为大家分享一下Linux下查看版本信息具体方法,有需要的小伙伴可以参考一下。
显示LSB(Linux Standard Base)兼容的发行版本信息。如果是LSB兼容的发行版本,在/etc/lsb-release就可以查看到具体的版本信息。
Linux中查看版本信息命令介绍Linux中查看版本信息命令介绍
lsb_release可以快速过滤这些信息找到自己需要的字段,这个命令有可能没有自带,可以自行安装lsb-release包就可以有了。
lsb_release-hFSGlsb_releasev1.4printscertainLSB(LinuxStandarDBAse)andDistributioninformation.Usage:lsb_release[OPTION]...WithnoOPTIONspecifieditisthesameas-v.Options:-v,--versionDisplaytheversionoftheLSBspecificationagainstthedistributioniscompliant.-i,--idDisplaythestringidofthedistributor.-d,--descriptionDisplaythesinglelinetextdescriptionofthedistribution.-r,--releaseDisplaythereleasenumberofthedistribution.-c,--codenameDisplaythecodenameaccordingtothedistributionrelease.-a,--allDisplayalloftheaboveinformation.-s,--shortDisplayalloftheaboveinformationshortoutputformat.-h,--Displaythismessage.lsb_release-aLSBVersion:n/aDistributorID:ManjaroLinuxDescription:ManjaroLinuxRelease:21.0.2Codename:Ornara
lsb_release这个命令需要有另外安装,如果没有安装也可以通过其他的版本信息文件找到版本的信息。
RHEL系列:/etc/redhat-release、/etc/os-release、/etc/system-release 等,这些文件一般都是指向同一个文件,如果是重新发行的版本,例如centos,还会有/etc/centos-release
Debian系列:/etc/debian-version、/etc/issue等,同样重新发行的版本也会有对应的version文件。

Linux中查看版本信息命令介绍Linux中查看版本信息命令介绍
查看内核版本一般都使用uname这个命令。
uname-aLinuxmanjaro5.11.14-1-MANJARO
用这个命令也可以快速过滤到自己需要的字段。
也可以直接查看/proc/version来查看当前云中的内核版本
cat/proc/versionLinuxversion5.11.14-1-MANJARO(builduser@LEGION)(gcc(GCC)10.2.0,GNUld(GNUBinutils
如何查阅Linux系统正在使用的Shell版本
1、查看当前使用的shellecho$shell2、查看当前系统支持的shell,使用cat、head、more等命令查看/etc/shells的内容即可。cat/etc/shells[root@localhost~]#cat/etc/shells/bin/sh/bin/bash/sbin/nologin/bin/tcsh/bin/csh/bin/ksh3、查看各个shell的版本,每个shell基本都带有--version参数,用于显示shell的版本号,执行如下命令ksh--versionbash--versioncsh--version[root@localhost~]#bash--versiongnubash,version3.1.17(1)-release(i686-redhat-linux-gnu)copyright(c)2005freesoftwarefoundation,inc.
怎么用命令查看ubuntu版本
在终端中执行下列指令:cat /etc/issue可以查看当前正在运行的 Ubuntu 的版本号。其输出结果类似下面的内容:Ubuntu 8.04 /n /l
如何查看linux版本
1./etc/issue 和 /etc/redhat-release都是系统安装时默认的发行版本信息,通常安装好系统后文件内容不会发生变化。 看你的贴图该linux安装的发行版是RHEL6.1。 _release -a :FSG(Free Standards Group)组织开发的LSB (Linux Standard Base)标准的一个命令,用来查看linux兼容性的发行版信息。 看你的贴图该linux发行版信息是RHEL6.2。 3./proc/version 和 uname -a 显示的内容相同,显示linux内核版本号。 关于lsb_release -a和/etc/issue显示的发行版本号不同,原因只有一个:内核升级了。 原因是:/etc/issue中的Final”和lsb_release -a中的NahantUpdate3不相同。 以下是我的服务器的相关信息,看一下就一目了然了![root@master ~]# cat /etc/issueRed Hat Enterprise Linux AS release 4 (Nahant Update 3)Kernel \r on an \m[root@master ~]# lsb_release -aLSB Version: :core-3.0-amd64:core-3.0-ia32:core-3.0-noarch:graphics-3.0-amd64:graphics-3.0-ia32:graphics-3.0-noarchDistributor ID: RedHatEnterpriseASDescription: Red Hat Enterprise Linux AS release 4 (Nahant Update 3)Release: 4Codename: NahantUpdate3[root@master ~]# cat /proc/version Linux version () (gcc version 3.4.5 (Red Hat 3.4.5-2)) #1 SMP Fri Feb 24 16:56:28 EST 2006
发表评论