LMatt Asked: 2015-10-17 05:27:21 +0800 CST2015-10-17 05:27:21 +0800 CST 2015-10-17 05:27:21 +0800 CST How do I check the version of Ubuntu I am running? [duplicate] 772 How can I check my current Ubuntu version through the command-line and GUI? command-line 4 Answers Voted fedorqui 2015-10-17T05:43:35+08:002015-10-17T05:43:35+08:00 As said in the official page, use: lsb_release -a Your version appears on the "Description" line. If you just want that line, type lsb_release -d. If you want to check it through your desktop environment, you can check System Settings → Details, which shows the data like this: Alternatives are: hostnamectl cat /etc/*ease See a sample output of lsb_release, hostnamectl, and cat /etc/*ease calls: $ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 16.04.2 LTS # <-- here Release: 16.04 Codename: xenial $ lsb_release -d Description: Ubuntu 16.04.2 LTS $ hostnamectl Static hostname: XXX Icon name: computer-desktop Chassis: desktop Machine ID: 3d6dcfdd7b9f41dbb62b0e8cd75014ae Boot ID: 4ff04a6baed54e719592f3255005a235 Operating System: Ubuntu 16.04.2 LTS # <-- here Kernel: Linux 4.10.0-38-generic Architecture: x86-64 $ cat /etc/*ease DISTRIB_ID=Ubuntu DISTRIB_RELEASE=16.04 DISTRIB_CODENAME=xenial DISTRIB_DESCRIPTION="Ubuntu 16.04.2 LTS" # <--- here NAME="Ubuntu" VERSION="16.04.2 LTS (Xenial Xerus)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 16.04.2 LTS" VERSION_ID="16.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" VERSION_CODENAME=xenial UBUNTU_CODENAME=xenial lese 2015-10-17T05:42:02+08:002015-10-17T05:42:02+08:00 Use: cat /etc/*release In my case it produced the following output: DISTRIB_ID=LinuxMint DISTRIB_RELEASE=17.2 DISTRIB_CODENAME=rafaela DISTRIB_DESCRIPTION="Linux Mint 17.2 Rafaela" NAME="Ubuntu" VERSION="14.04.3 LTS, Trusty Tahr" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 14.04.3 LTS" VERSION_ID="14.04" HOME_URL="http://www.ubuntu.com/" SUPPORT_URL="http://help.ubuntu.com/" BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/" Volker Siegel 2015-10-17T08:58:45+08:002015-10-17T08:58:45+08:00 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 15.04 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 user364819 2015-10-17T05:46:32+08:002015-10-17T05:46:32+08:00 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:
As said in the official page, use:
Your version appears on the "Description" line. If you just want that line, type
lsb_release -d
.If you want to check it through your desktop environment, you can check System Settings → Details, which shows the data like this:
Alternatives are:
hostnamectl
cat /etc/*ease
See a sample output of
lsb_release
,hostnamectl
, andcat /etc/*ease
calls:Use:
In my case it produced the following output:
Use this in the terminal to show the details about the installed Ubuntu "version":
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
):Add
-s
(--short
) for use in a script:See the further examples for the more useful options
-c
(--codename
) and-d
(--description
), and both combined:Note you can get similar information about the currently running kernel, and the hardware by the similar command:
Executing this in Terminal will give you all of the information you could possibly need:
And you can access it in the GUI by going
System Settings > Details
: