Gpg Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

Gpg Installation On A Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian And MacOS

gpg

GNU Privacy Guard.

Maintainer: Debian GnuPG Maintainers



Section: utils

Install gpg

  • Debian apt-get install gpg Click to copy
  • Ubuntu apt-get install gpg Click to copy
  • Alpine OS apk add gnupg Click to copy
  • Arch Linux pacman -S gnupg Click to copy
  • Kali Linux apt-get install gpg Click to copy
  • CentOS yum install gpg Click to copy
  • Fedora dnf install gnupg Click to copy
  • Raspbian apt-get install gnupg Click to copy
  • macOS brew install gnupg Click to copy

GNU Privacy Guard.

How to use gpg?

Below are few example commands for gpg that you can use in the terminal.

Sign doc.txt without encryption (writes output to doc.txt.asc):
gpg --clearsign doc.txtClick to copy
Encrypt doc.txt for [email protected] (output to doc.txt.gpg):
gpg --encrypt --recipient [email protected] doc.txtClick to copy
Encrypt doc.txt with only a passphrase (output to doc.txt.gpg):
gpg --symmetric doc.txtClick to copy
Decrypt doc.txt.gpg (output to STDOUT):
gpg --decrypt doc.txt.gpgClick to copy
Import a public key:
gpg --import public.gpgClick to copy
Export public key for [email protected] (output to STDOUT):
gpg --export --armor [email protected]Click to copy
Export private key for [email protected] (output to STDOUT):
gpg --export-secret-keys --armor [email protected]Click to copy
Install the latest version of gpg in Debian, Ubuntu, Alpine, Arch, Kali, CentOS, Fedora, Raspbian and macOS from terminal. To install the gpg just copy the above command for your OS and run into terminal. After you run the command it will grab the latest version of gpg from the respository and install it in your computer/server.