Take the 2-minute tour ×

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.

share|improve this question
Why do you ask? See en.wikipedia.org/wiki/Linux_Standard_Base –  Basile Starynkevitch Oct 23 '12 at 17:33

2 Answers 2

up vote 3 down vote accepted

For displaying details including release and codename of the distro

lsb_release -a
share|improve this answer

I hope this works echo $(lsb_release -si)

share|improve this answer

Your Answer


