Generate a key by typing in a command line:
gpg --gen-key
A series of prompts guides you through the process. The default values suffice in almost all cases. Remember to choose a good password.
Choosing a Good Password
A good password:
consists of uppercase and lowercase letters, numbers, punctuation, and other characters
does not include any words or names, with or without substitutions
is not the same as any other password used for other systems
In the resulting text, find your key ID in the statement that resembles 'pub 1024D/1B2AFA1C'. Your key ID is the 8 character 'word' after the slash (/). In the previous example, the GPG Key ID is 1B2AFA1C. Write down your key ID.
Export your public key to a public server so that others can find it with the following command, substituting your key ID:
gpg --keyserver subkeys.pgp.net --send-keys GPGKEYID