Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Thanks , but there is no option on uname which can correctly show OS .
For example on a server with centos 4 , is simply shows "GNU/Linux"
I don't think there's a command that can identify distros. There has to be something unique to a distro for something to identify the distro, and as all distros use mostly the same code/programs there's nothing unique to be identified.
Several distros maintain a text file containing the info. <snip>
For example arch has /etc/arch-release however as of the latest release, it doesn't contain anything.
I found that on Ubuntu I have two similar files:
The former one contains only number 4, which probably means on which version of Debian was current Ubuntu based on. The lsb-release file contains all the information needed.
Similarly, on CentOS I found file /etc/redhat-release.
It seems that
should do on many Linux systems (but of course not on any).