lsb_release command in linux - view system information in ubuntu with examples

  • Last updated: Oct 24, 2024
  • Views: 58
  • Author: Admin

If you are a system administrator and want to effectively manage your Ubuntu-based system, then you absolutely need to know how to view system information in the operating system. You may need system information when diagnosing and optimizing the operation of your server and much more. System information can include various data such as processor characteristics or, for example, the total amount of RAM on the server and so on.

We will view system information using the lsb_release command. The lsb_release command is a very simple and at the same time convenient tool in Ubuntu for quickly obtaining information about your operating system. lsb_release shows data about the Ubuntu release and its code name.

In this article, we will try to consider in detail how to use the lsb_release command and how to quickly and easily get basic information about your Ubuntu operating system.

 

Syntax of the lsb_release command.

lsb_release [options]

Parameters:

-i, --id - Displays the distribution identifier.

-d, --description - Displays a description of the distribution.

-r, --release - Displays the release version.

-c, --codename - Displays the version code name.

a-, --all - Displays complete information about the system.

-s, --short - Short output format.

You can use the lsb_release command with both short parameter names and full names.

 

Examples of the lsb_release command.

1. The first and most common use of lsb_release is to call the command with the -a parameter.

~$ lsb_release -a

ubuntu command lsb_release_a

Descriptions of the output result:

  • No LSB modules are available. - Reports that there are no LSB modules available in the system.
  • Distributor ID: Ubuntu - Displays the distribution identifier.
  • Description: Ubuntu 24.04.1 LTS - Displays a full description of the operating system version.
  • Release: 24.04 - Displays the release version number.
  • Codename: noble - Displays the version code name.

 

2. The second option is to run the lsb_release command with the -d parameter.

~$ lsb_release -d

ubuntu command lsb_release_d

The result will be only a description of the distribution, which may be useful for you to quickly view the operating system version.


 

 3. The third option is to run the lsb_release command with the -r parameter.

~$ lsb_release -r

ubuntu command lsb_release_r

The command will output the Ubuntu release version number.


 

4. The fourth option is to run the lsb_release command with the -c parameter.

~$ lsb_release -c

ubuntu command lsb_release_c

As a result, the command will output the code name of the Ubuntu operating system version. The code name will be a very useful property for you because it can be used in the repository settings or when installing any packages.


 

5. The fifth option is to execute the lsb_release command with the -i parameter.

~$ lsb_release -i

ubuntu command lsb_release_i

The commands will only output the distribution identifier.


 

6. The sixth option is to run the lsb_release command with the -s parameter.

~$ lsb_release -s -r
~$ lsb_release -s -i
~$ lsb_release -s -c
~$ lsb_release -s -d

ubuntu command lsb_release_s

The command returns information in a shortened form without a description of the parameter.


 

In conclusion, we have covered the useful lsb_release commands to view system information on Ubuntu based Linux system.

 

SIMILAR ARTICLES

How to Install Composer on Ubuntu 24.04
How to Install and Enable SSH on Ubuntu