How to find out what GNU/Linux distribution you're using

Recently I needed to find out what GNU/Linux a terminal-only server is using. The most obvious thing I could think of was to use:

uname -a

Unfortunately, it will return the kernel information only – no details about the distribution though.
The distribution info is located in a different file which is dependent on… the distribution itself. Check out the list of those filenames here.

As a majority of those files ends with “release” part, in most cases it should be enough to execute the following command:

cat /etc/*release