Linux command
secret-tool 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Store
secret-tool store --label="[My password]" [attribute] [value]
Look up
secret-tool lookup [attribute] [value]
Search
secret-tool search [attribute] [value]
Search and unlock
secret-tool search --all --unlock [attribute] [value]
Clear
secret-tool clear [attribute] [value]
说明
secret-tool stores and retrieves passwords using the Freedesktop Secret Service API. It communicates with running keyring daemons such as gnome-keyring or KWallet over D-Bus. Secrets are not addressed by name but by arbitrary attribute/value pairs (for example `service mybackup user alice`). The same pairs used to store a secret must be supplied to look it up or remove it.
参数
- --label _label_
- Human-readable label for the secret (required for store).
- --all
- Show all matching secrets, not just the first (search only).
- --unlock
- Unlock locked collections during the search.
FAQ
What is the secret-tool command used for?
secret-tool stores and retrieves passwords using the Freedesktop Secret Service API. It communicates with running keyring daemons such as gnome-keyring or KWallet over D-Bus. Secrets are not addressed by name but by arbitrary attribute/value pairs (for example `service mybackup user alice`). The same pairs used to store a secret must be supplied to look it up or remove it.
How do I run a basic secret-tool example?
Run `secret-tool store --label="[My password]" [attribute] [value]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does --label _label_ do in secret-tool?
Human-readable label for the secret (required for store).