If you want to use Metasploit, you will need to install this program manually as it is not found in Ubuntu's repository (feel free to correct me on this).
You will first need to install the following libraries from Ubuntu's repositories:
sudo apt-get install subversion ruby libruby rdoc libyaml-ruby libzlib-ruby
sudo apt-get install libopenssl-ruby libdl-ruby libreadline-ruby
sudo apt-get install libiconv-ruby rubygems libgtk2-ruby libglade2-ruby
You will then need to download Metasploit 3.2 from the Metasploit website at URL:
The easiest way would be to use the wget command:
Unpack the program:
tar -zxvf framework-3.2.tar.gz
You will then need to update Metasploit with the latest exploits and updates by going into the framework-3.2 sub-directory and issuing the subversion update command:
sudo svn update
You now have the latest version of Metasploit. It is recommended that you issue the "sudo svn update" command every time you are about to use the program or at least once a week.
Tested this on Ubuntu 9.04 (Jaunty Jackalope) beta...