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.
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/Elementary: sudo apt install pass Fedora and similar: sudo dnf install pass macOS (Homebrew):
brew install pass2. 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 alvin4. Basic Pass Commands
4.1 Add a Password
pass add www.example.comYou’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.comThis 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.com4.4 Search the Store
pass grep example5. 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 -- firefoxInstall 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.
With pass and PassFF, you get a fully encrypted, command‑line‑driven password manager that works seamlessly across your Linux desktop and web browsers.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
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.)
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
