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

LinuxVersionCommand Line-Interface

Linux Problem Overview


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.

Linux Solutions


Solution 1 - Linux

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

Solution 2 - Linux

For displaying details including release and codename of the distro

lsb_release -a

Solution 3 - Linux

I hope this works echo $(lsb_release -si)

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionmcandreView Question on Stackoverflow
Solution 1 - Linuxramit girdharView Answer on Stackoverflow
Solution 2 - LinuxRag SagarView Answer on Stackoverflow
Solution 3 - LinuxBhanu KaushikView Answer on Stackoverflow