What’s my ubuntu (or debian) version?

I have a  number of machines running various OS releases. Sometimes I need to check what flavor or relase I’m running on the current machine.
While uname -a will show the Linux kernel version, there are a few ways to get more information.
Here are three possibilities:
cat /etc/issue
cat /etc/lsb-release

and my favorite:
lsb_release -a

Here’s some sample output from lsb_release:
$ lsb_release -a
LSB Version: core-2.0-ia32:core-2.0-noarch:core-3.0-ia32:core-3.0-noarch:core-3.1-ia32:core-3.1-noarch:core-3.2-ia32:core-3.2-noarch:core-4.0-ia32:core-4.0-noarch
Distributor ID: Ubuntu
Description: Ubuntu 10.04.1 LTS
Release: 10.04
Codename: lucid

The “lsb” in these commands refers to the Linux Standard Base.  For more information, see the Linux Foundation .