Sometimes I need to access some servers running Linux (or maybe another Unix-like SO), but I don't know how to verify which distribution is in use on the server (there are times that even the "responsible" person for the server doesn't know).
Is there an easy and reliable way to discover that, one that is uniform and consistent across all of them?
cat /etc/*release
Most distributions put a release file in /etc/
(like /etc/redhat-release
, /etc/gentoo-release
, etc.) which usually has the version number of your distribution in it.
lsb_release -i
may work for you.
More detail is available with lsb_release -a
Some discussion at http://etbe.coker.com.au/2007/08/30/identifying-the-distribution-of-a-linux-system/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With