21st December 2024

Lsb_release Command in Linux

With the lsb_release command, you can obtain information specific to your Linux distribution. The lsb_relase command is one of the commands you can use about your system. This command is part of a package called lsb-core. If you cannot get any output when you give the lsb_release command, you can install the necessary packages with the sudo apt install lsb-core command.

First, let’s view the help information and see the options. If you issue the lsb_release command with no options, the -v option is used by default.

root@omer:~# lsb_release --help
Usage: lsb_release [options]

Options:
  -h, --help         show this help message and exit
  -v, --version      show LSB modules this system supports
  -i, --id           show distributor ID
  -d, --description  show description of this distribution
  -r, --release      show release number of this distribution
  -c, --codename     show code name of this distribution
  -a, --all          show all of the above information
  -s, --short        show requested information in short format
lsb_release --help
lsb_release –help

 

lsb_release -v

Lists additional LSB modules installed on your system that the distribution you are using supports. “No LSB modules are available.” If you get the result, you can see the LSB modules you can install by issuing the command sudo apt install lsb-core.

ot@omer:~# lsb_release -v
No LSB modules are available.
lsb_release -v
lsb_release -v

 

lsb_release -i

Displays the ID credential of the authority providing the Linux distribution.

root@omer:~# lsb_release -i
Distributor ID: Kali
lsb_release -i
lsb_release -i

 

lsb_release -d

With this command, you can view the description of the distribution you are using.

root@omer:~# lsb_release -d
Description: Kali GNU/Linux Rolling
lsb_release -d
lsb_release -d

 

lsb_release -r

With this command, you can view the version number of the distribution you are using.

root@omer:~# lsb_release -r
Release:        2019.4
lsb_release -r
lsb_release -r

 

LEARN MORE  What is PowerShell? What Should Be PowerShell Security?

lsb_release -c

With this command, you can view the code name of the distribution you are using.

root@omer:~# lsb_release -c
Codename:       kali-rolling
lsb_release -c
lsb_release -c

 

lsb_release -a

This command displays all of the options described above at once.

root@omer:~# lsb_release -a
No LSB modules are available.
Distributor ID: Kali
Description:    Kali GNU/Linux Rolling
Release:        2019.4
Codename:       kali-rolling
lsb_release -a
lsb_release -a

 

lsb_release -as

The -as an option is an auxiliary option. It means short information. It serves to display only the information itself without the title name on the left side of the information to be displayed. It can be very useful in bash programming.

root@omer:~# lsb_release -as
No LSB modules are available.
Kali
Kali GNU/Linux Rolling
2019.4
kali-rolling
lsb_release -as
lsb_release -as

 

Leave a Reply

Your email address will not be published. Required fields are marked *