Gnu Privacy Guard (GnuPG) is a free software implementation of the OpenPGP Standard. Most people use GnuPG or GPG to encrypt and sign files and messages while some also use it for Secure Shell (SSH) authentication and signing their Git commits and tags.



GnuPG is part of Debian. To install on Debian or its derivatives:

sudo apt install gnupg

For non-Debian Linux distributions, consult the appropriate guide for the distro of your choice.


To install GnuPG on a Mac, you can use Homebrew:

brew install gnupg


To install GnuPG on Windows, you can download the Gpg4win Installer.

Generating keys

Before you can start using GPG, you need to first generate a key pair. To do so, key in the command in your terminal or command prompt:

gpg --gen-key

Follow the prompts by entering your name, email, and passphrase and you are done. Congratulations!


Contributing to the Guide

This open source guide is curated by thousands of contributors. You can help by researching, writing and updating these articles. It is an easy and fun way to get started with contributing to open source.