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.
From boot-time messages
$ 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)
From /proc/version
$ 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
From /etc/issue
$ cat /etc/issue Ubuntu 7.10 \n \l
Look for 'release' and 'version' in /etc
$ 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 command
$ uname -a Linux kidwellb-ubuntu 2.6.22-14-generic #1 SMP Tue Dec 18 08:02:57 UTC 2007 i686 GNU/Linux
Discussion
To comment on this page, please copy and paste the following into an email and send it to me. Useful and informative comments will be published within a day or two.