Determining Ubuntu Version

There are couple of ways to determine the Ubuntu version your machine is running.

  • cat /etc/lsb-release
  • cat /etc/issue

Out of this the lsb-release seems to be the most comprehensive.

$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.10
DISTRIB_CODENAME=intrepid
DISTRIB_DESCRIPTION=”Ubuntu 8.10″

and the /etc/issue the most terse.

$ cat /etc/issue
Ubuntu 8.10 n l

The uname command provides the version of Linux distribution.

$ uname -r
2.6.27-11-generic

The uname -m option will help you determine if you are running the 32-bit version or 64-bit version of Ubuntu.

$ uname -m
i686

Apparently if you are running a 64-bit version (on a 64-bit machine), you should get something like x86_64 as the result.