For what i know, there is no standard way to know for sure…
but each Distro have their own version file you can cat somewhere.
Try these:
- “$cat /etc/redhat-release” will show you information for red hat based distros.
- “$cat /etc/SuSE-release” for SUSE based distros.
- “$cat /etc/mandrake-release” for mandrake distros.
- “$cat /etc/debian_version” for debian based distros.
- “$cat /etc/UnitedLinux-release” might also return some more information.
I also found this useful tip at linuxhelp.net:
You *might* get some clues by running “uname -r” which will show you kernel version – Some ditributors will rename the kernel to make it specific to their distro (eg, RHEL kernels have RHEL in their name)
Note: As pointed out by Ricardo “$cat /etc/debian_version” won’t return the distro itself, but the version of the distro. Sorry :/

![[del.icio.us]](http://techtrouts.com/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://techtrouts.com/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://techtrouts.com/wp-content/plugins/bookmarkify/facebook.png)
![[Twitter]](http://techtrouts.com/wp-content/plugins/bookmarkify/twitter.png)
June 17th, 2008 at 12:49 pm
The instructions that you gave don’t return the linux distro itself, but the version of the distro.
ie. cat /etc/debian_version -> “lenny,sid,etch,etc..”
:)
November 4th, 2009 at 12:32 pm
For ubuntu distros, cat (or less) /etc/lsb-release.
Or, run command: lsb_release -a
January 19th, 2010 at 7:31 pm
I have been using.
lsb_release -a
This works for both Debian, Ubuntu and Cento