Get the App
SLTechnology News&Howtos  ›  Development  › 

How to check version information under Linux

Shulou Source: shulou.com Published: 2022-06-01 22:49:49 10月18日 Update

This article is to share with you about how to view version information under Linux. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Lsb_release

Displays LSB (Linux Standard Base) compatible release information. If it is a LSB-compatible distribution, you can view the specific version information at / etc/lsb-release.

Commands for viewing version Information in Linux introduction to commands for viewing version Information in Linux

Lsb_release can quickly filter this information to find the fields you need, this command may not come with it, you can install your own lsb-release package.

Lsb_release-hFSG lsb_release v1.4 prints certain LSB (Linux Standard Base) andDistribution 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-aLSB Version: n/aDistributor ID: ManjaroLinuxDescription: Manjaro LinuxRelease: 21.0.2Codename: OrnaraVersion file

The lsb_release command requires a separate installation, and if not, you can find the version information through other version information files.

RHEL series: / etc/redhat-release, / etc/os-release, / etc/system-release, etc. These files generally point to the same file. If it is a reissued version, such as centos, there will be / etc/centos-release.

Debian series: / etc/debian-version, / etc/issue, etc., and the reissued version will also have a corresponding version file.

Commands for viewing version information in Linux introduce the kernel version in Linux

The command uname is generally used to check the kernel version.

Uname-aLinux manjaro 5.11.14-1-MANJARO # 1 SMP PREEMPT Wed Apr 14 08:25:29 UTC 2021 x 86 million 64 GNU/Linux

You can also quickly filter to the fields you need with this command.

You can also check / proc/version directly to see the current kernel version in the cloud.

Cat / proc/versionLinux version 5.11.14-1-MANJARO (builduser@LEGION) (gcc (GCC) 10.2.0, GNU ld (GNU Binutils) Thank you for reading! This is the end of this article on "how to view version information under Linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Tags: Version information command file release kernel content field more article good practical can pass point to article see knowledge cloud reference help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Shulou Information vpn NVidia MariaDB