GPG (GNU Privacy Guard) - Create GPG keyring (--gen-key)

by
Jeremy Canfield |
Updated: August 14 2021
| GPG (GNU Privacy Guard) articles
The gpg command with the --gen-key flag can be used to create the GPG keyring.
gpg --gen-key
Or the --full-generate-key flag can be used to get prompts for additional data, such as the size of the private key, the expiration date of the public certificate, and the public certificate type (e.g. RSA or DSA).
gpg --full-generate-key
This command should create the hidden .gnupg in the users home directory, and within the hidden.gnupg should be the GPG keyring file.
[root@lab1 ~]# ll /root/.gnupg
14196878 0 drwx------ 2 root root 58 Aug 14 13:55 openpgp-revocs.d
9201150 0 drwx------ 2 root root 110 Aug 14 13:55 private-keys-v1.d
5537050 4 -rw-r--r-- 1 root root 1986 Aug 14 13:55 pubring.kbx
5537031 4 -rw------- 1 root root 32 Aug 14 13:38 pubring.kbx~
5537032 4 -rw------- 1 root root 600 Aug 14 13:47 random_seed
5537052 4 -rw------- 1 root root 1280 Aug 14 13:56 trustdb.gpg
Did you find this article helpful?
If so, consider buying me a coffee over at