What version of Linux am I running: Difference between revisions

From Useful Data
Jump to navigation Jump to search
m Improved the formatting
Added 'look in software sources'
Line 70: Line 70:
== Problems ==
== Problems ==
None of the above tell me this PC is running Xubuntu rather than Ubuntu!
None of the above tell me this PC is running Xubuntu rather than Ubuntu!
== A belated obvious solution ==
Look in the software sources.  It probably contains the distribution name and the version.  :-/




[[Category:Linux]]
[[Category:Linux]]

Revision as of 14:17, 21 December 2018

What do you want to know?

Knowing the kernel name is 'Linux' is probably not what you want. (From: uname -s)
Your network node hostname is a mouthful but is your computer's name, such as 'simonX64'. (From: uname -n)
The kernel release sounds hopeful but is something like '3.13.0-93-generic'. (From: uname -r)
The kernel version sounds promising but is an unintelligible '#140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016'. (From: uname -v)
(The remaining uname options are no better.)

You want to know what the distribution is called and what release is it, such as 'LinuxMint 17.3' or 'Xubuntu 14.4'.

From the terminal

To find out which distribution and version is installed on your computer, use the command line:

$cat /etc/*release 

which gives something like this:

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.5 LTS"
NAME="Ubuntu"
VERSION="14.04.5 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.5 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/"

or

lsb_release -a

which gives output like:

No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 14.04.5 LTS
Release:	14.04
Codename:	trusty

The 'uname' command is ugly:

uname -a
Linux simonX64 3.13.0-93-generic #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux

and even more ugly is:

cat /proc/version
Linux version 3.13.0-93-generic (buildd@lgw01-13) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #140-Ubuntu SMP Mon Jul 18 21:21:05 UTC 2016

A simple one is:

cat /etc/issue

giving just:

Ubuntu 14.04.5 LTS \n \l

Applications which may help

hardinfo

i686 v x86_64 v x64

i686 is 32-bit. As is i386.
x86_64 is 64-bit (64-bit version of the 80x86 chipset). Also, amd64 and x64.

The Intel 80386 was the first 32-bit Intel processor in the 80x36 series.

Useful commands for determining what processor you have are:

uname -m

which returns the 'machine hardware name, but I'm not sure if that is what the processor is, or what the operating system is. And

cat /proc/cpuinfo

which returns loads of stuff.

Problems

None of the above tell me this PC is running Xubuntu rather than Ubuntu!

A belated obvious solution

Look in the software sources. It probably contains the distribution name and the version.  :-/