Posted 17 January 2008 by Brendan Kidwell

Which Linux or Unix Distribution am I Running?

Try these commands to find out what kind of system you're logged into. The example output comes from an Ubuntu 7.10 desktop.

$ dmesg|head -1
[    0.000000] Linux version 2.6.22-14-generic (buildd@terranova) (gcc
version 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue
Dec 18 08:02:57 UTC 2007 (Ubuntu 2.6.22-14.47-generic)
$ cat /proc/version
Linux version 2.6.22-14-generic (buildd@terranova) (gcc version 4.1.3
20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)) #1 SMP Tue Dec 18
08:02:57 UTC 2007
$ cat /etc/issue
Ubuntu 7.10 \n \l
$ ls /etc/*-release /etc/*-version /etc/*_release /etc/*_version
/etc/debian_version  /etc/lsb-release
$ cat /etc/debian_version
lenny/sid
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=7.10
DISTRIB_CODENAME=gutsy
DISTRIB_DESCRIPTION="Ubuntu 7.10"
$ uname -a
Linux kidwellb-ubuntu 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC
2007 i686 GNU/Linux
You could leave a comment if you were logged in.