In AWS EC2 how to know your ubuntu version using the command line commands



lsb stands for Linux Standard Base.

Certain LSB (Linux Standard Base) and Distribution information is printed by lsb_release command.

You can view information about your Linux distribution with the lsb_release command. For instance, it shows information on LSB modules. Additionally, the distributor’s ID and release number are displayed.

ubuntu@ip-10-11-112-26:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.3 LTS
Release:        18.04
Codename:       bionic

You can see your Ubuntu version, along with separate lines for the release number and its description, using the /etc/lsb-release command. If you’re using an old version of Ubuntu, you might like to use it since it is made for older systems.

ubuntu@ip-10-11-112-26:~$ cat /etc/lsb-release

Other options for lsb_release are as follows

  1. -v, –version : Shows the LSB version that the distribution complies with. A list of LSB module descriptions separated by colons is used to express the version. The module name, version, and architecture name are contained in dash-separated tuples that make up LSB module descriptions.
  2. -i, –id : Displays string id of distributor.
  3. -d, –description : Displays single line text description of distribution.
  4. -r, –release : Displays release number of distribution.
  5. -c, –codename : Displays codename according to distribution release.
  6. -a, –all : Displays all of the above mentioned information.
  7. -s, –short : Displays all the above information in short format.
  8. -h, –help : Displays a human-readable help message.
Author: user

Leave a Reply