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
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