Which version of debian am I running?

You can check which version of debian you are running by running the command

user@server:/var/log/installer$ cat /var/log/installer/lsb-release
DISTRIB_ID=Debian
DISTRIB_DESCRIPTION=”Debian GNU/Linux installer”
DISTRIB_RELEASE=”4.0 (installer build 20070308etch2)”
X_INSTALLATION_MEDIUM=cdrom

or similary for Ubuntu you can run

user@server:~$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=8.04
DISTRIB_CODENAME=hardy
DISTRIB_DESCRIPTION=”Ubuntu 8.04.1″