LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

age

Simple and modern file encryption

TLDR

Encrypt a file with a passphrase
$ age -p [file.txt] > [file.txt.age]
copy
Decrypt a file with passphrase
$ age -d [file.txt.age] > [file.txt]
copy
Encrypt with recipient's public key
$ age -r [age1publickey...] [file.txt] > [file.txt.age]
copy
Encrypt with multiple recipients
$ age -r [key1] -r [key2] [file.txt] > [file.txt.age]
copy
Encrypt using SSH public key
$ age -R [~/.ssh/id_ed25519.pub] [file.txt] > [file.txt.age]
copy
Decrypt with identity file
$ age -d -i [key.txt] [file.txt.age] > [file.txt]
copy

SYNOPSIS

age [-e|-d] [-a] [-i identity] [-r recipient] [-R file] [-o output] [input]

DESCRIPTION

age is a simple, modern file encryption tool with small explicit keys, no config options, and composable with Unix pipes. It's designed as a replacement for GPG with a cleaner interface and fewer footguns.age supports encryption to one or more recipients, passphrase encryption, and can use SSH keys for recipient-based encryption. The format is designed to be simple and auditable.

PARAMETERS

-e, --encrypt

Encrypt input (default operation)
-d, --decrypt
Decrypt input
-p, --passphrase
Encrypt with passphrase
-r, --recipient recipient
Encrypt to recipient public key (repeatable).
-R, --recipients-file file
Read recipients from file, one per line (repeatable).
-i, --identity identity
Identity (private key) file for decryption (repeatable). May also be used with -e for SSH or encrypted identities.
-o file
Output file (default: stdout)
-a, --armor
Use ASCII armored format

INSTALL

sudo apt install age
copy
sudo dnf install age
copy
sudo pacman -S age
copy
sudo apk add age
copy
sudo zypper install age
copy
brew install age
copy
nix profile install nixpkgs#age
copy

CAVEATS

age does not sign files; use age + signify or minisign for authenticated encryption. Keys are not interchangeable with GPG keys. No built-in key management; keys are just files.

HISTORY

age was designed by Ben Cartwright-Cox and Filippo Valsorda and first released in 2019. It was created to address the complexity and usability issues of GPG while providing a secure, simple encryption tool suitable for modern use cases.

SEE ALSO

RESOURCES

Copied to clipboard
Kai