---
aliases: ["PGP", "GnuPG", "OpenPGP"]
website: https://www.gnupg.org/
obj: application
---
# GPG
gpg is the OpenPGP part of the GNU Privacy Guard (GnuPG). It is a tool to provide digital encryption and signing services using the OpenPGP standard. gpg features complete key management and all the bells and whistles you would expect from a full OpenPGP implementation.

## Commands

**Sign:**
```shell
gpg --sign
gpg -s
gpg --clear-sign # Sign with clear text
```

**Encrypt:**
```shell
gpg --encrypt
gpg -e
```

**Symmetric Encryption:**
```shell
gpg --symmetric
gpg -c
```

**Decrypt:**
```shell
gpg --decrypt
gpg -d
```

**Verify:**
```shell
gpg --verify
```

## Keys

**List keys:**
```shell
gpg --list-keys
gpg -k # List public keys
gpg -K # List private keys
```

**Generate key:**
```shell
gpg --generate-key
```

**Import & export keys:**
```shell
gpg --export
gpg --import
```

**Key selection:**
```shell
 -r, --recipient KEY # Encrypt for key
 -u, --local-user KEY # Use this key
```


