Find Linux Distribution Command

At command prompt type: lsb_release -a

I can verify this works with CentOS.
Here is the example output.
LSB Version: :base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch:g
raphics-4.0-amd64:graphics-4.0-noarch:printing-4.0-amd64:printing-4.0-noarch
Distributor ID: CentOS
Description: CentOS release 6.4 (Final)
Release: 6.4
Codename: Final

This does not work for all version of Linux. I also have a Gentoo server. I used the following to get the information.
cat /etc/*-release

Displays the following info.
Gentoo Base System release 1.12.11.1