110

What terminal command tells the version of Ubuntu.

Nick Bailuc
  • 3,335

2 Answers2

141

For the description and the release number including the OS name, run:

$ lsb_release -d
Description:    Ubuntu 12.04 LTS

Just for the the codename, use:

$ lsb_release -c
Codebase:   precise

For the release number only, use:

$ lsb_release -r
Release:    12.04

For all lsb version details, use:

$ lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 12.04 LTS
Release:    12.04
Codename:   precise
k0pernikus
  • 6,336
carnendil
  • 5,529
79

This should give you what you want:

cat /etc/lsb-release
SirCharlo
  • 40,096