LSB – Linux Standard Base – is a joint project by a number of Linux vendors to standardize the OS environment. Apart from sharing many common principles in their structure, LSB participating Linux distributions share quite a few commands. lsb_release is one of them, and it allows you to find out all the LSB information about your Linux distribution.
I'm going to use a Ubuntu Feisty (7.04) in my examples.
Release number of a Linux distribution
Sure, there's a uname command to find this out, but lsb_release is just another way to reconfirm your Linux release number:
ubuntu$ lsb_release -r Release: 7.04
Codename of a Linux distribution
If you're just after the codename of your Linux distribution, then -c is the command line option for you. I particularly like it because many novices have really hard times figuring out their Ubuntu codename, while most of the seasoned users only use the codenames and rarely specify the release number.
ubuntu$ lsb_release -c Codename: feisty
Full Linux Standard Base release information
If you want to find out everything there is to know about your LSB participating Linux distro, use the -a command line option:
ubuntu$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 7.04 Release: 7.04 Codename: feisty
- uname – print Unix system information