In the past, the best way to get KeePass running on Linux is to install KeePassX, which is a port over version of KeePass 1.x. To get KeePass 2.x to run in Linux, you will need to install a whole bunch of mono libraries and manually install the source file. Worst still, it might not work in the end. Luckily, that kind of days is over. Julian Taylor has released a PPA that allows you to install KeePass 2 easily (only work in Ubuntu or other debian based distro).
Note: The PPA will install a whole bunch of mono libraries in your system. If you are not comfortable with it, this is not for you.
Install KeePass 2 in Ubuntu
Open a terminal and type:
sudo apt-add-repository ppa:jtaylor/keepass sudo apt-get update sudo apt-get install keepass2
That’s all you need to get KeePass 2 working in Ubuntu.
Importing KeePassX database to KeePass 2
If you have been using KeePassX, your password database will be in .kdb form which is incompatible with KeePass2 .kdbx. Furthermore, when you try to import in your .kdb database to KeePass 2, it will show an error stating that the importing is only supported in Windows.
A way to get around this is to first export your .kdb database to KeePassX XML file.
Next, in your KeePass2, go to FIle -> Import. Select KeePassX XML as the format and choose the XML file that you have earlier exported.