How to find out the OS name of a Linux
So how do you get the distro name of the Linux you are using? The
uname command doesn't really help a lot of time.
$ uname -a
Linux hackbox 2.6.32-131.17.1.el6.x86_64 #1 SMP Thu Oct 6 19:24:09 BST 2011 x86_64 x86_64 x86_64 GNU/Linux
Try looking for the details in
$ cat /proc/version
Linux version 2.6.32-5-xen-amd64 (Debian 2.6.32-31) (firstname.lastname@example.org) (gcc version 4.3.5 (Debian 4.3.5-4) ) #1 SMP Tue Mar 8 00:01:30 UTC 2011
So that's a Debian.
If you are not lucky with
/proc/version. You could try looking at the release files.
$ cat /etc/*-release
CentOS release 6.2 (Final)
CentOS! If that fails, try calling
$ lsb_release -a
You should see the name of the distro in the
Distributor ID section.
While we are at it, if you want to know the kernel version the OS is running:
$ uname -mrs
Linux 18.104.22.168-106.53.amzn1.x86_64 x86_64