Secure Your Linux Passwords with Pass: Install, Configure, and Use GPG Encryption

This guide walks you through installing the Unix‑style Pass password manager on Linux, configuring GnuPG keys, initializing a secure password store, using basic Pass commands, and integrating it with browsers via PassFF for seamless, encrypted credential management.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Secure Your Linux Passwords with Pass: Install, Configure, and Use GPG Encryption

Why Use a Command‑Line Password Manager?

In today’s internet‑driven world we juggle countless accounts, and reusing passwords is risky. Commercial managers like 1Password or Dashlane are great but often require a subscription. pass offers a lightweight, free, Unix‑style solution that encrypts passwords with GnuPG.

1. Install Pass

Pass is available in most Linux distribution repositories.

Debian/Ubuntu/E­lementary: sudo apt install pass Fedora and similar: sudo dnf install pass macOS (Homebrew):

brew install pass

2. Set Up GnuPG

Pass encrypts data with a GPG key. If you don’t already have one, generate it: gpg --generate-key The command prompts for your name, email, and a passphrase. Keep the resulting key safe and back up the ~/.gnupg directory, otherwise any data encrypted with it will become unrecoverable.

3. Initialise the Password Store

After installing and configuring GPG, initialise a store for your passwords. The name you provide (e.g., alvin) distinguishes different users of the same store.

pass init alvin

4. Basic Pass Commands

4.1 Add a Password

pass add www.example.com

You’ll be prompted to type the password, which is then saved as an encrypted .gpg file in ~/.password-store/. The file is unreadable with cat or less because it’s encrypted.

4.2 Edit a Password Entry

pass edit www.example.com

This opens the encrypted file in your editor, allowing you to add a username, URL, or any other secret data.

4.3 Show a Password

pass show www.example.com

4.4 Search the Store

pass grep example

5. Browser Integration with PassFF

To avoid opening a terminal for every login, install the PassFF host script and browser extension.

Download and run the host installer (replace firefox with your browser name):

curl -sSL https://github.com/passff/passff-host/releases/latest/download/install_host_app.sh | bash -s -- firefox

Install the PassFF extension from your browser’s add‑on store.

After restarting the browser, a small “P” icon appears next to password fields. Clicking it shows matching entries; the pen‑paper icon fills the form, and the paper‑plane icon can submit it automatically.

PassFF browser integration screenshot
PassFF browser integration screenshot

With pass and PassFF, you get a fully encrypted, command‑line‑driven password manager that works seamlessly across your Linux desktop and web browsers.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

CLISecurityencryptionpassword managerpassGPG
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.