Let’s say you’ve been given access to a Linux machine (SSH or any other plain terminal), but you have no idea of version or distro you are using.
Even though Linux is mostly the same, there are some diferences. So, to find out, here’s a couple of commands that can be usefull.
head -n1 /etc/issue
and
uname -a
Note that the first command can be deceiving. /etc/issue is a text file that can be altered.
Enjoy.