How to check which Ubuntu release is installed (including codename)

If you are not sure which Ubuntu version you are currently using or you need its codename, open a terminal and run the following command:

lsb_release -drc

This should give you something like

user@host.local:~$ lsb_release -drc
Description:	Ubuntu 9.10
Release:	9.10
Codename:	karmic

You may find the -s parameter useful if you need the pure codename or release number (e.g. for doing comparisons within a bash script). Examples:

user@host.local:~$ lsb_release -sc
user@host.local:~$ lsb_release -sr

Have a look at the lsb_release manpage to get a list of all available parameters.

QR Code
QR Code os:ubuntu:get-installed-release (generated for current page)
Translations of this page: