Linux command
pass 命令
安全
权限或系统影响较大,执行前请核对目标。
常用示例
Initialize password store
pass init [gpg-id]
List all passwords
pass
Show a password
pass [folder/name]
Copy password
pass -c [folder/name]
Generate new password
pass generate [folder/name] [20]
Generate without symbols
pass generate -n [folder/name] [20]
Insert a password
pass insert [folder/name]
Edit a password
pass edit [folder/name]
Remove a password
pass rm [folder/name]
Search passwords
pass grep [search_term]
Sync with git
pass git push
说明
pass (password-store) is a simple password manager that stores passwords in GPG-encrypted files organized in a directory hierarchy. Each password is stored in a separate file, encrypted with one or more GPG keys. The password store is a directory tree at ~/.password-store, with each file containing a single password and optionally additional data. Git integration enables version control and synchronization. pass provides a simple, Unix-philosophy approach to password management, using existing tools (GPG, git, tree) rather than custom databases.
参数
- init _gpg-id_
- Initialize password store.
- ls _subfolder_
- List passwords.
- show _name_
- Decrypt and show password.
- insert _name_
- Insert new password.
- edit _name_
- Edit password with editor.
- generate _name_ _length_
- Generate new password.
- rm _name_
- Remove password.
- mv _old_ _new_
- Move/rename password.
- cp _old_ _new_
- Copy password.
- find _pass-names_...
- Locate passwords matching the given name (alias: search).
- grep _pattern_
- Search decrypted files.
- git _args_
- Execute git command.
- help
- Show usage information.
- version
- Show version information.
- -c, --clip
- Copy to clipboard instead of displaying.
- -m, --multiline
- Insert a multiline password (with insert).
- -f, --force
- Do not prompt before overwriting.
- -n, --no-symbols
- Generate password without symbols.
FAQ
What is the pass command used for?
pass (password-store) is a simple password manager that stores passwords in GPG-encrypted files organized in a directory hierarchy. Each password is stored in a separate file, encrypted with one or more GPG keys. The password store is a directory tree at ~/.password-store, with each file containing a single password and optionally additional data. Git integration enables version control and synchronization. pass provides a simple, Unix-philosophy approach to password management, using existing tools (GPG, git, tree) rather than custom databases.
How do I run a basic pass example?
Run `pass init [gpg-id]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does init _gpg-id_ do in pass?
Initialize password store.