I covered some password managers in the past including Buttercup and Enpass, and they were all GUI apps. Today, I introduce to you a password manager that you can use only via your terminal, it’s called Pass.
Pass is an open-source command line-based password manager application that implements the Unix philosophy by saving passwords in encrypted GPG files which can be organized in various folder hierarchies, transferred between computers, and manipulated using standard command line file management utilities.
Pass, being ultimately a bash script, makes use of some Python and Ruby to carry out tasks like password imports from other managers, for example. It saves your passwords into a .password-store
folder hidden in your home directory.
Features in Pass
- FOSS: Pass is free and open-source with its code available here.
- Bash completion.
- Community contribution: impressive clients including cross-platform GUIs for other platforms, clients for Windows, Android, iOS, a Firefox extension, an interactive console UI e.t.c.
- Git integration.
- Support for extensions.
- import passwords from other password managers including LastPass, KeepassX, Keepass2 CSV and XML, CVS, 1Password, and KWallet.
- Password generation
- A comprehensive documentation in its man page.
How to Install and Use Pass in Linux
If you don’t already have a GPG key then you will need to create one for yourself using this guide.
To install Pass run the following command as per your Linux distributions.
$ sudo apt-get install pass [On Debian/Ubuntu] $ sudo yum install pass [On Fedora/RHEL/CentOS] $ sudo zypper in password-store [On OpenSuse]
And Initialize the password store with this command:
$ pass init GPG_ID_OR_EMAIL
GPG_ID_OR_EMAIL is either the ID of your eight-digit hex code GPG key or the email address you used to create the GPG key. You can always review both keys using the command: “gpg –list-secret-keys”.
Now that you’re set to go, this is how you add a new password e.g for geeksmint.com within the “beginner” folder:
$ pass insert beginner/geeksmint.com
List all your passwords by typing “pass” which will return a tree view:
$ pass Password Store └── beginner └── geeksmint.com
You can show the password using the following command (for the same “beginner category” and “geeksmint.com” item) like so.
$ pass beginner/geeksmint.com
You can copy the password to the clipboard without displaying like so:
$ pass -c beginner/geeksmint.com
To edit an existing password, for example, the same “beginner/geeksmint.com” entry above, use:
$ pass edit beginner/geeksmint.com
You will be asked to enter your GPG password and after which you can edit the stored password or other information to the file.
That’s all! A lot of work if you ask me. In fact, left to me alone I will stick to the GUI password managers especially because they don’t require me to dedicate that much of my time to set them up.
But who knows? The terminal might be your favorite place to be in – to each his own. Is it yours? Tell us what you think about Pass in the comments section below.
Good, consise read. I don’t trust gui’s (pull my eth before startx) on my main box.
Didn’t expect the last note. But I believe most linux users, that stick with it, much prefer the command line.