Command Line

This is a common question I have to know which version I am working with. Here are a few options you can do.

1. Get all the information

lsb_release -a
user@yourvps:~# lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 12.04.3 LTS
Release:	12.04
Codename:	precise

2. Get the Codename

lsb_release -c
user@yourvps:~# lsb_release -c
Codename:	precise

3. Get the Description

lsb_release -d
user@yourvps:~# lsb_release -d
Description:	Ubuntu 12.04.3 LTS

4. Get the Release Number

lsb_release -r
user@yourvps:~# lsb_release -r
Release:	12.04