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
For displaying details including release and codename of the distro
lsb_release -a
I hope this works echo $(lsb_release -si)
Try the below command.... It worked for me...
Once you know that you are running Red Hat for example, you can get to the point with:
Or on Debian:
or in general :
Also you could use the following command