How to find out which Linux distribution I'm logged on to

Is there a command for finding out the distribution of the OS I'm logged on to through SSH? uname can be used to print a whole lot of info, but apparently not the distribution (e.g. RedHat, Ubuntu etc.) nor the version of that distribution.


I am afraid, there is no standarized way to check it. Every distribution seems to have its own way of announcing its version. You may try: cat /etc/*release, it may work on a few systems. Also, /etc/issue may contain distribution information.


lsb_release -a should work on most distributions.


lsb_release and more /etc/redhat-release for redhat and fedora i dont have idea about ubuntu and all other distro