How do I identify the particular Linux flavor via command line?

mcandre picture mcandre · Oct 23, 2012 · Viewed 56.4k times · Source

I'd like to be able to detect which particular Linux flavor is installed on a computer, e.g. Ubuntu vs Fedora, via a command line command.

Some people recommend uname -a, but that only reports the kernel version.

Answer

ramit girdhar picture ramit girdhar · Jan 29, 2015

Try the below command.... It worked for me...

cat /proc/version

Once you know that you are running Red Hat for example, you can get to the point with:

cat /etc/redhat-release

Or on Debian:

cat /etc/debian_version

or in general :

cat /etc/*-release

Also you could use the following command

cat /etc/issue