Linux users have a powerful alternative to browser-based password managers: pass, also known as The Standard Unix Password Manager. This open-source command-line tool stores every password in a separate file encrypted with GPG (GNU Privacy Guard), organises credentials into folders and supports synchronisation between computers through Git. It requires neither a cloud account nor a proprietary database. Users retain control of the encrypted files and the cryptographic keys needed to access them.
The key facts about pass and Linux password management in 30 seconds
- pass encrypts each password individually using GPG and stores the files in
~/.password-store. - It can add credentials, generate random passwords, edit entries, copy secrets to the clipboard and organise them into directories.
- Git can track changes and synchronise the encrypted password store across multiple computers.
- gopass extends the original approach with multiple password stores and team-sharing capabilities.
- QtPass provides a graphical interface for Linux, Windows and macOS, making the system more accessible to desktop users.
The project was developed by Jason A. Donenfeld, also known as the creator of WireGuard. Its philosophy follows a familiar Unix principle: use small tools, open formats and files that can be managed with conventional software.
This approach is particularly appealing to system administrators, developers and users who prefer to retain control of their data. However, it also means taking responsibility for tasks that commercial password managers usually handle automatically, such as managing encryption keys, preparing backups and configuring synchronisation.
How pass Works: One Password, One Encrypted File
The structure of pass is straightforward. Each credential is stored in a separate file inside a directory called ~/.password-store. GPG encrypts its contents, and only an authorised private key can decrypt the entry.
For example, an entry named email/gmail corresponds to a file with this structure:
~/.password-store/
└── email/
└── gmail.gpgCode language: JavaScript (javascript)
The name is simply a label chosen by the user. It does not establish a connection with Gmail or any other service. It is only a way to organise and locate the credential.
Installation on Debian and Ubuntu is straightforward:
sudo apt install pass
GPG is also required. Many Linux distributions already include it or make it available through their standard package repositories.
Before initialising the password store, check whether a private GPG key already exists:
gpg --list-secret-keysCode language: PHP (php)
If no key appears, a new one can be generated:
gpg --full-generate-key
GPG presents several options for configuring the key type, algorithm, expiration period and associated identity. The available choices depend on the installed version. Users should select an appropriate configuration rather than assuming that every algorithm supports the same key sizes or settings.
The private key should be protected with a strong passphrase. It is also important to keep a secure backup of the private key and its revocation certificate. If the private key is lost and no recoverable backup exists, the encrypted passwords may become permanently inaccessible.
Once the key has been created, initialise pass by specifying its identifier:
pass init your-email@example.comCode language: CSS (css)
The email address can be used as the identifier if it matches the identity associated with the GPG key. For more precise key selection, users can also specify its fingerprint.
Adding, Viewing and Generating Passwords From the Terminal
With the password store configured, adding a credential requires just one command:
pass insert email/gmail
The tool prompts the user to enter the password twice to confirm that it was typed correctly. It then encrypts the content and saves it in the corresponding file.
To retrieve the credential:
pass show email/gmail
GPG requests authorisation to decrypt the file. If the GPG agent has cached the passphrase for a configured period, the user may not need to enter it again for every operation.
There is also a way to copy a password directly to the clipboard:
pass -c email/gmail
Instead of displaying the secret on screen, pass copies it to the clipboard and schedules its removal after 45 seconds by default. This feature requires a compatible clipboard utility to be available on the system.
Another useful feature is random password generation:
pass generate email/newservice 20
This command generates a random 20-character password and stores it under the specified path. pass can also generate passwords without symbols or copy them directly to the clipboard.
Credentials can be organised using ordinary directory structures:
pass insert work/slack
pass insert work/github
pass insert personal/netflix
To list entries within a category:
pass work
An existing credential can be modified with:
pass edit email/gmail
The command opens the entry in the user’s configured text editor, temporarily decrypts its contents and encrypts them again when the changes are saved.
Entries can also be deleted:
pass rm personal/old-account
The result is a password manager that can be operated using a relatively small set of commands, without requiring a graphical interface.
Git Synchronisation Keeps Passwords Encrypted Across Devices
One of pass’s most interesting features is its integration with Git. Users can turn their password directory into a Git repository:
pass git init
From that point onwards, changes can be recorded in Git’s history. The repository can be synchronised with a self-hosted server or services such as GitHub and GitLab.
The files stored in the repository contain encrypted credentials, so the server does not need to receive passwords in readable form. However, there is an important detail: file names and directory structures are not encrypted. Someone with access to the repository could discover which services the owner uses, even without being able to read the actual passwords.
For this reason, private repositories and properly protected GPG keys are recommended. Git also retains historical versions, meaning that deleting an entry from the current password store does not automatically remove it from every previous revision.
This integration makes it possible to maintain the same password store across multiple computers. However, each device that needs to decrypt credentials must have access to the corresponding private key.
gopass Adds Features for Teams and Multiple Devices
Official website: gopass.pw · GitHub repository
For users who need more functionality, gopass extends the original pass approach. Written in Go, it maintains compatibility with the underlying password-store format while adding capabilities for more complex environments.
Its features include multiple password stores, Git synchronisation, support for different GPG keys and secret sharing between team members.
The initial setup also includes a guided process to configure the password store, encryption keys and remote repositories. Its documentation covers Linux, macOS and Windows.
On Debian and Ubuntu, users should follow the project’s official installation instructions. Some distributions provide a package called gopass that does not correspond to the Go-based project. Checking the package source before installation helps avoid installing a different application with the same name.
QtPass Brings a Graphical Interface to Linux and Windows
Official website: qtpass.org · Source code
Not everyone wants to retrieve credentials through a terminal. QtPass provides a graphical interface for working with the same encrypted-file approach.
It allows users to view, add and edit entries, generate passwords and copy secrets to the clipboard. It also supports time-based one-time passwords (TOTP), multiple keys and compatible GPG security devices.
One of its main advantages is cross-platform support. QtPass runs on Linux, Windows and macOS, allowing users to work with the same password-store structure across different operating systems.
On Windows, it can be installed through WinGet:
winget install IJHack.QtPassCode language: CSS (css)
On Debian and Ubuntu:
sudo apt install qtpass
This makes it possible to use a shared password store across different environments, which is particularly useful for people who manage Linux servers but use Windows or macOS on their personal computers.
What Users Gain and What They Must Manage Themselves
pass offers independence from a password manager provider, encrypted files based on established standards and a format that can be handled with conventional tools. Its Git integration also makes it possible to maintain backups and synchronise devices without sending readable passwords to an external service.
However, it does not automatically replace every feature found in modern password managers. The original tool does not provide the same built-in browser autofill, seamless synchronisation, password-reuse detection or account recovery features offered by some commercial services.
Encryption also does not protect against every possible threat. A compromised computer, a stolen private key or an inadequately protected backup can expose the password store. Key management and device security remain part of the user’s responsibility.
For anyone looking for a simple, open and terminal-based password manager, pass remains an interesting option. gopass adds capabilities for more complex environments, while QtPass lowers the barrier to entry for users who prefer a graphical application.
All three share the same underlying philosophy: store credentials in encrypted files that users can keep, inspect and move without depending on a proprietary platform.
Frequently Asked Questions
What is pass in Linux?
pass is an open-source password manager that stores each credential in an individual GPG-encrypted file. It organises passwords into directories and supports Git for tracking changes and synchronising the password store.
Is pass a secure way to store passwords?
It uses GPG encryption and private keys controlled by the user. Its security also depends on protecting the private key, keeping devices free from malware and maintaining appropriate backups.
What is the difference between pass and gopass?
pass provides the core functionality for storing, encrypting and managing credentials. gopass extends those capabilities with multiple password stores, synchronisation and tools for sharing secrets between users.
Can pass be used on Windows?
Yes. QtPass provides a graphical interface compatible with Windows, Linux and macOS. Other clients and tools can also work with password stores that follow the pass format.
