GPG (GNU Privacy Guard) - List keyrings (--list-keys)

by
Jeremy Canfield |
Updated: August 14 2021
| GPG (GNU Privacy Guard) articles
The gpg command with the --list-keys flag can be used to list a users GPG keyrings. In this example, there is a single keyring, located a /root/.gnupg/pubring.kbx.
[root@lab1 ~]# gpg --list-keys
/root/.gnupg/pubring.kbx
------------------------
pub rsa3072 2021-08-14 [SC] [expires: 2023-08-14]
6144240CC1574477CC6DB78880FFFAE61599470D
uid [ultimate] Jeremy Canfield <john.doe@example.com>
sub rsa3072 2021-08-14 [E] [expires: 2023-08-14]
Did you find this article helpful?
If so, consider buying me a coffee over at