What is the Linux lsb_release command?

Your individual Linux distribution's LSB (Linux Standard Base) information, including the version number, release Codename, and distributor ID, can be seen by using the lsb release command.

What is the Linux lsb_release command?

We may obtain information about the Linux Standard Base (LSB), especially the presently used Linux distribution, using the LSB release command in Bash. It includes several type of data, such as version number, releaseCodename, and distributor ID.

Syntax

Options

Lsb release follows the standard GNU practice of using a single dash (-) for short options and two dashes (--) for lengthy options.

  • -v, --version :
    It display which version of the Linux Standard Base is supported by your machine. A list of LSB module descriptions separated by colons serves as the version's display.
  • -i, --id :
    It shows the ID of your Linux distribution. For instance, if you are using Debian, this option displays Distributor ID: Debian.
  • -d,--description :
    Give a brief overview of your Linux distribution. As an illustration, if you are using CentOS 7, this shows something like:
    Release 7.3.1611 of the Linux distribution CentOS (Core)
  • -r, --release :
    It will display the current operating system's release number. It displays Release:
    For example: If you are using Fedora 25, it shows 25.
  • -c,--codename :
    Give the current operating system's Codename a visual representation. For example, this displays Codename: xenial if you are using Ubuntu 16.04 as your operating system.
  • -a, --all :
    All of the data above should be displayed. For instance, LSB Version: 1.4 is displayed if you are using Arch Linux.
    ID for Distributor: Arch
    The Arch Linux operating system
    Raise: rolling
    Unknown Codename
  • -s, --short :
    Use the output format that excludes headers, "short". It can be used in conjunction with another choice. For instance, the command will not work if you are using Fedora 25.
  • -h, --help :
    An explanation of these options will be displayed in a help message.

Setting up LSB Core

The software bundle known as the LSB core, which is included in lsb release, may not always be pre-installed on your computer.

Run the command listed below that is appropriate for your particular system to install it:

  1. Ubuntu, Debian :
  1. CentOS :
  1. Fedora :
  1. OpenSUSE :
  1. Arch :

Various distributions :

Consult the repository of your package manager to find the package containing |lsb-core| and/or |lsb release| if your Linux distribution is not listed here.

The lsb release command made available by the Free Standards Group has been reimplemented in this. The author listed below is entirely accountable for any bugs.

The detection of systems utilizing a mixture of packages from different distributions or releases is somewhat of a black art; the present heuristic tends to presume that the installation is of the earliest distribution, which is still utilized by apt, but that heuristic is susceptible to error.

How to use the lsb release command in Linux to check the OS version

There are numerous reasons why you might need to know what Linux distribution or OS version your Linux system runs on. There are a variety of ways to find the Linux version that is currently installed on your machine. The LSB release command is one of the alternatives.

The LSB release command will be used to determine the Linux version after the package has been installed. The Linux version you are using can be found here. Launch the command prompt, then enter:

The codename for a Linux release

The command line option -c is the one for you if all you need to know is the Codename of your Linux distribution. You really enjoy it because most seasoned users merely use the codenames and infrequently give the release number, but many beginners have an extremely difficult time figuring out their Ubuntu codename.


Next TopicGaruda Linux




Latest Courses