HOWTO: Check which version or flavor of Linux a system is running

terminal.png

Purpose: This will be quick one unlike most of the other post on this blog. In this entry we will see how we can check which version of Linux (or Unix) a particular system is running. For example, suppose I am logged into a system’s console that I know is running Linux, but how do I know which version of Linux (Debian, Fedora, Ubuntu, Gentoo) the system is running.

On any Linux system that you are logged in give the following command:
homepc:~# cat /proc/version
Linux version 2.6.26-1-amd64 (Debian 2.6.26-13) (waldi@debian.org) (gcc version 4.1.3 20080704 (prerelease) (Debian 4.1.2-24)) #1 SMP Sat Jan 10 17:57:00 UTC 2009
homepc:~#

As you can see the above command tells us many things:

1. Flavor and version of Linux – Debian & 4.1.2-24 (pre-release)

2. Kernel version – 2.6.26-1-amd64

3. GCC version – 4.1.3

4. 32/64 bit – SMP

Many people will suggest trying the following commands unsuccessfully:
homepc:~# uname -a
Linux homepc 2.6.26-1-amd64 #1 SMP Sat Jan 10 17:57:00 UTC 2009 x86_64 GNU/Linux

As you can see the above command does NOT give which flavor of Linux I am running.

That’s it. Please don’t forget to rate this post below if you found it useful.

No Posts Found

Comments are closed.