lsb_release

Show release version information

Supplementary instructions

LSB is the abbreviation of Linux Standard Base. The lsb_release command is used to display information related to LSB and specific versions. If this command is used without parameters, the -v parameter is added by default.

-v displays version information.
-i displays the distribution id.
-d displays a description of the distribution.
-r displays the specific version number of the current system release.
-c release codename.
-a displays all the information above.
-h displays help information.

If the current release is LSB-compatible, the /etc/lsb_release file will contain the LSB_VERSION field. The value of this field can be a colon-separated list of supported modules. These module names are the module names of the LSBs supported by the current version. If the current version is not LSB compatible, do not include this field.

Optional fields include DISTRIB_ID, DISTRIB_RELEASE, DISTRIB_CODENAME, DISTRIB_DESCRIPTION, which can override the contents of the /etc/distrib-release file. Note: The distrib here should be replaced with the name of the current distribution. If the /etc/lsb-release.d directory exists, the file name will be searched in the directory and prepended to LSB_VERSION as an additional module version. The file /etc/distrib-release contains some description information to explain which file names should be analyzed.

The general format is Distributor release x.x (Codename) Note: Debian system lacks corresponding description information (see /etc/debian-version). In order to support Debian system, most of the information is added to lsb-release in the file.

In redhat and fedora systems, one parameter is also supported:

-s, --short Output a short description.