Following command helped me earlier (on CentOS though) Most likely should work on Ubuntu too ...
example output
Code:
Linux localhost.localdomain 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 00:01:37 BST 2012 x86_64 x86_64 x86_64 GNU/Linux
'x86_64' in output above is an indication that it is 64 bit