sudo apt-add-repository ppa:jtaylor/keepass sudo apt-get update
Now lets install KeePass (automatically downloaded from the PPA we just added):
sudo apt-get install keepass2
(Just know that KeePass is available from the official Ubuntu Package archive/repository, and can be installed easily via the Ubuntu Software Center, but it's not always the latest version.)
Now install the xdotool package (for simulation of X11 keyboard/mouse input) available from the official Ubuntu Package archive/repository:
sudo apt-get install xdotool
This package is necessary for the auto-type hot key function (Ctrl + V) in KeePass to work in Ubuntu. This is something most people miss, and complain that KeePass is broken in Ubuntu.