Install KeePass on Linux

Most professionals use multiple highly complex passwords for every purpose  so the only problem usually occurs is saving password somewhere safe and accessible. There are few good choices for storing passwords, some are online such as LastPass and some are off-line in which the passwords will be encrypted and stored in files. The best password manager application I know and ever tested is KeePass.

The main reason why KeePass 2.x  is not so popular in Linux base operating system community is because this software does not have Linux or Mac version, but it is easy to run it on Linux. Mind that there are some native Linux applications such as KeePassX that can handle .kdb files which is used for KeePass 1.x but the KeePass2.x uses another file format which is .kdbx

In this tutorial, I’m going to write the best way to install KeePass on Linux. Also you can find how to install KeePass on Mac OSX in this website.

The following instructions is applicable to Fedora, Redhat and Centos, though the first few lines can be adopted to be used in other Linux distributions.

Things we should do for this matter:

  1. Download required files
  2. Extract the files in an appropriate position
  3. Set permittions
  4. Create icon in application list
  5. Restart Gnome

 

1. Download required files

We need two files, the KeePass portable version which is a .zip file, and the official KeePass icon. For the first one, go to KeePass download page and downloading the portable version of KeePass in the Professional Edition section, or you can go directly to SourceForge and click on the green download button or even click on the link below to get the last version:

http://sourceforge.net/projects/keepass/files/latest/download?source=files

The next file is the KeePass official icon which you can find by clicking on the image below:

http://upload.wikimedia.org/wikipedia/commons/1/19/KeePass_icon.png

 

2. Extract the files in an appropriate position

The very important step is switching to root:

su

First you should create a folder for these files (you can change the path):

mkdir /usr/bin/KeePass

Then move the files you just downloaded in the folder you created (I made this tutorial with version 2.21 of keepass, if you are using another version, correct the file name in the following command):

mv KeePass-2.21.zip /usr/bin/KeePass
mv KeePass_icon.png  /usr/bin/KeePass

and now it’s time to extract the zip file with the following command (remember to change the path of you have used another path in the above 3 commands):

unzip /usr/bin/KeePass/KeePass-2.21.zip -d  /usr/bin/KeePass/

 

3. Set permittions

now that the files successfuly extracted, it’s better to make this folder accessible by user:

chmod -r 775  /usr/bin/KeePass

 

4. Create icon in application list

Use the following command to create a file in application folder:

nano /usr/share/applications/KeePass.desktop

Then copy these lines into the file and save the file (to learn how to use nano text editor, click here):

[Desktop Entry]
Name=KeePass
Exec=mono /usr/bin/KeePass/KeePass.exe
Icon=/usr/bin/KeePass/KeePass_icon.png
Categories=Other
Type=Application

Quick hint:
to save the file in Nano text editor:
Ctrl + x   and then press y

 

5. Restart Gnome

After creating the file in application folder, we should restart the GNOME to make it read the files in application folder again. (we also can restart the system, but it is not necessary. )

If you are using Fedora 16 or above, to restart the GNOME  press Alt + F2 to open the command prompt and then type r and press enter.

If you are using other Linux OS, perhaps you cann use the following command (I have not used such command yet):

sudo /etc/init.d/gdm restart

4 thoughts on “Install KeePass on Linux”

  1. This information helped us get KeePass running in our mixed-OS environment. Very helpful and you deserve alot for taking the time to post this.

    Thank you!

  2. I assume that there is a little Typo in the description above, as all UNIXes are CaseSensitive…

    mkdir /usr/bin/KeePass

    Then move the files you just downloaded in the folder you created (I made this tutorial with version 2.21 of keepass, if you are using another version, correct the file name in the following command):

    mv KeePass-2.21.zip /usr/bin/keepass
    mv KeePass_icon.png /usr/bin/keepass

    Here it should be
    mv KeePass-2.23.zip /usr/bin/KeePass
    mv KeePass_icon.png /usr/bin/KeePass

Leave a Reply

Your email address will not be published. Required fields are marked *

This is new type of CAPTCHA, make the puzzle please !WordPress CAPTCHA