ADVERTISEMENTS
Linux Apps

Pass – Manage Your Passwords from Linux Command Line

Pass - Linux Commandline Password Manager
Written by Martins Okoi
ADVERTISEMENTS

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.

ADVERTISEMENTS

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 fossmint.com within the “beginner” folder:

$ pass insert beginner/fossmint.com

List all your passwords by typing “pass” which will return a tree view:

$ pass
Password Store
└── beginner
└── fossmint.com

You can show the password using the following command (for the same “beginner category” and “fossmint.com” item) like so.

$ pass beginner/fossmint.com

You can copy the password to the clipboard without displaying like so:

$ pass -c beginner/fossmint.com

To edit an existing password, for example, the same “beginner/fossmint.com” entry above, use:

$ pass edit beginner/fossmint.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.

  Safe Eyes - A Must Have Tool to Reduce Computer Eye Strain
ADVERTISEMENTS

About the author

Martins Okoi

Martins Divine Okoi is a Computer Science graduate with a passion for Linux and Open Source software. He is studying again for an MSc in Cybersecurity but still makes time to write about the best software the market has to offer.