How can I check my current Ubuntu version through the command-line and GUI?

  • 1
    Since this came up in my search first I'll post one alternative: checking /etc/apt/sources.list and seeing what repo it's pulling from. This was the only way I could figure out what Ubuntu image I was running inside of a docker run -it --rm which apparently doesn't install lsb_release – Bratchley Nov 7 '17 at 16:10

As said in the official page, use:

lsb_release -a

Your version appears on the "Description" line.

If you want to check it through your desktop environment, you can check System Settings -> Details.

| improve this answer | |
  • 74
    why is it this weird command? I can't ever remember it. Why not something like os -v. Its sort of annoying. – Charlie Parker Dec 16 '16 at 7:07
  • 5
    Seems like the 80's had a lot of good things, including simple and easy to remember UNIX commands! – João Rocha da Silva May 4 '17 at 11:01
  • 11
    Ah, in good ol' plain DOS it was simply ver – kap May 13 '17 at 15:45
  • 28
    Ubuntu's official LTS Docker image (ubuntu:xenial) does not have lsb_release; I had to parse /etc/os_release as noted in another answer. – Aaron D. Marasco Sep 16 '17 at 4:24
  • 8
    @CharlieParker According to man lsb_release, LSB stands for Linux Standard Base. – Serge Stroobandt Sep 18 '17 at 9:19


cat /etc/*release

In my case it produced the following output:

DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela"
VERSION="14.04.3 LTS, Trusty Tahr"
PRETTY_NAME="Ubuntu 14.04.3 LTS"
| improve this answer | |
  • 13
    cat /etc/lsb-release – user4381 Dec 6 '16 at 17:35
  • 3
    On current mint releases /etc/upstream-release/lsb-releasemight be of interest as well. – cheffo Apr 17 '17 at 19:26
  • 12
    This works everywhere I tested. lsb_release doesn't work on all versions. for example in Ubuntu 16.04 on Docker. – Jay Jun 3 '17 at 7:11
  • 3
    In my experience this is a more robust approach, some distributions will not have the lsb_release command – RutgerH Sep 27 '17 at 12:23
  • 1
    worked on my docker image – Rıfat Erdem Sahin Mar 9 '18 at 9:32

Use this in the terminal to show the details about the installed Ubuntu "version":

lsb_release -a

This may be more verbose than you need - maybe you just wanted to see 15.4? It can be shown separately by the option -r (--release):

$ lsb_release -r
Release:        15.04

Add -s (--short) for use in a script:

$ lsb_release -r -s

See the further examples for the more useful options -c (--codename) and -d (--description), and both combined:

$ lsb_release -c
Codename:       vivid
$ lsb_release -d
Description:    Ubuntu 15.04
$ lsb_release -dc
Description:    Ubuntu 15.04
Codename:       vivid

Note you can get similar information about the currently running kernel, and the hardware by the similar command:

$ uname -a
Linux mybox 3.19.0-31-generic #36-Ubuntu SMP Wed Oct 7 15:04:02 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
| improve this answer | |
  • 1
    lsb_release -r -s was what i was looking for, thanks – Lukas Liesis Dec 28 '17 at 11:56
  • 1
    lsb_release -rs and lsb_release -cs are very useful in scripts. – frozen-flame Jun 27 '18 at 3:08

Executing this in Terminal will give you all of the information you could possibly need:

lsb_release -a

And you can access it in the GUI by going System Settings > Details:

enter image description here

| improve this answer | |

Not the answer you're looking for? Browse other questions tagged or ask your own question.