2025-03-14 21:59:59 -06:00
|
|
|
# age
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
> A simple, modern, and secure file encryption tool.
|
|
|
|
|
> See also: `age-keygen`.
|
|
|
|
|
> More information: <https://github.com/FiloSottile/age#usage>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Generate an encrypted file that can be decrypted with a passphrase:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`age {{[-p|--passphrase]}} {{[-o|--output]}} {{path/to/encrypted_file.age}} {{path/to/unencrypted_file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Encrypt a file with one or more public keys entered as literals (repeat the `--recipient` flag to specify multiple public keys):
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`age {{[-r|--recipient]}} {{public_key}} {{[-o|--output]}} {{path/to/encrypted_file.age}} {{path/to/unencrypted_file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Encrypt a file to one or more recipients with their public keys specified in a file (one per line):
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`age {{[-R|--recipients-file]}} {{path/to/recipients_file.txt}} {{[-o|--output]}} {{path/to/encrypted_file.age}} {{path/to/unencrypted_file}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Decrypt a file with a passphrase:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`age {{[-d|--decrypt]}} {{[-o|--output]}} {{path/to/decrypted_file}} {{path/to/encrypted_file.age}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Decrypt a file with a private key file:
|
|
|
|
|
|
2026-02-18 06:55:01 -07:00
|
|
|
`age {{[-d|--decrypt]}} {{[-i|--identity]}} {{path/to/private_key_file}} {{[-o|--output]}} {{path/to/decrypted_file}} {{path/to/encrypted_file.age}}`
|