If you are working an a distant computer or a virtual machine this will help you:
$ cat /etc/issue
Ubuntu 10.04 LTS \n \l
For the kernel version:
$ uname -a
Linux tatooine 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:28:05 UTC 2010 x86_64 GNU/Linux
To display the amount of free and used memory:
$ free -m
total used free shared buffers cached
Mem: 3896 3557 339 0 336 1023
-/+ buffers/cache: 2196 1700
Swap: 1155 0 1155
To gather some data about your hardware try lshw:
$ sudo lshw
tatooine
description: Computer
width: 64 bits
capabilities: vsyscall64 vsyscall32
*-core
description: Motherboard
physical id: 0
*-memory
description: System memory
physical id: 0
size: 3896MiB
*-cpu
...