Encrypt a specified file for a specified recipient, writing the output to a new file with .gpg appended

gpg2

  • GNU Privacy Guard 2.
    See `gpg` for GNU Privacy Guard 1.
    More information: <https://docs.releng.linuxfoundation.org/en/latest/gpg.html>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

gpg2 --encrypt --recipient {{[email protected]}} {{path/to/doc.txt}}

click the source code to copy install gpg2 on any operating system with command-not-found.com