Jump to content

Identify what Linux Distribution and Version


Recommended Posts

Sometimes your linux box has been running for such a long time you may have forgotten what the heck you are running. The quickest and easiest way to identify what you have is run the following command

lsb_release -a

example:

$ lsb_release -a

No LSB modules are available.

Distributor ID: Ubuntu

Description: Ubuntu 14.04.4 LTS

Release: 14.04

Codename: trusty

If that doesn't work for one reason or another try this command instead

cat /etc/*-release

example:

$ cat /etc/*-release

DISTRIB_ID=Ubuntu

DISTRIB_RELEASE=14.04

DISTRIB_CODENAME=trusty

DISTRIB_DESCRIPTION="Ubuntu 14.04.4 LTS"

NAME="Ubuntu"

VERSION="14.04.4 LTS, Trusty Tahr"

ID=ubuntu

ID_LIKE=debian

PRETTY_NAME="Ubuntu 14.04.4 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/"

You may also want to know what kernel version you are running

uname -a

or

uname -mrs

example:

$ uname -a

Linux usrn2netweb01 3.2.0-35-generic-pae #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012 i686 i686 i686 GNU/Linux

Linux = Kernel name

3.2.0-35-generic-pae = Kernel version number

i686 = Machine hardware name

Finally you can see what kernel and gcc version with the following command

cat /proc/version

example:

$ cat /proc/version

Linux version 3.2.0-35-generic-pae (buildd@aatxe) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #55-Ubuntu SMP Wed Dec 5 18:04:39 UTC 2012

Link to post
Share on other sites
×
×
  • Create New...