Run the following command to view the version of the Ubuntu/Linux running on that machine:
cat /etc/issue
Ubuntu 9.04 \n \l
In RedHat based systems, you can issue the following command to know the OS release/version:
cat /etc/redhat-release
Enterprise Linux Enterprise Linux AS release 4 (October Update 5)
Usefull post. I bookmark this