Long time ago I have described an easy way to check Ubuntu release.
Today I want to expand this topic a little bit further and mention about additional switch to check an upstream release, which can be very useful at times.

As I have already described in an earlier blog post, you can check current release using the following command.

$ lsb_release -a
No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 17 Qiana
Release:	17
Codename:	qiana

To check upstream release add an additional --upstream or the equivalent -u switch, but know that it does not apply to every Linux distribution, but to derivative ones.

$ lsb_release -a -u
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04 LTS
Release:	14.04
Codename:	trusty

As a side note, currently supported switches are presented below.

$ lsb_release --help
Usage: lsb_release [options]
  -h, --help         show this help message and exit
  -v, --version      show LSB modules this system supports
  -u, --upstream     show upstream LSB data
  -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