upgrading an Ubuntu server from the command line

This is how I upgraded from 8.10 to 9.04 over the network:

sudo apt-get install update-manager-core
sudo do-release-upgrade

[reference : http://www.ubuntu.com/getubuntu/upgrading ]