LinuxCommandLibrary

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
Encrypt to recipient public key (repeatable)
-R file
Read recipients from file (one per line)
-i identity
Identity file for decryption
-o file
Output file (default: stdout)
-a, --armor
Use ASCII armored format

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 Filippo Valsorda at Google and 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

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community