SSH is sometimes the only mode of access you have to a server. So how do you instantly determine the distro in use?
The following would work for most popular distributions (RedHat, CentOS, Ubuntu, etc.):
If the above returns “No such file or directory”, try the following which would work on Debian-based distros:
Finally, for kernel-related data, use the following command:
You’ll be able to determine the kernel version and release date, whether it’s a 32 or 64 bit hardware and the current machine hostname.