nerdexam
Linux_Foundation

LFCS · Question #406

By default, when verifying a signed file or a file with a detached signature, which keyring is used to search for public keys?

The correct answer is D. ~/.gnupg/pubring.gpg. By default, GPG stores and searches for public keys, which are essential for verifying digital signatures, in the ~/.gnupg/pubring.gpg file.

Submitted by marco_it· Apr 18, 2026Essential Commands

Question

By default, when verifying a signed file or a file with a detached signature, which keyring is used to search for public keys?

Options

  • A~/.gnupg/trustdb.gpg
  • B~/.gnupg/secring.gpg
  • C~/.gnupg/trustedkeys.gpg
  • D~/.gnupg/pubring.gpg

How the community answered

(53 responses)
  • A
    8% (4)
  • B
    2% (1)
  • C
    4% (2)
  • D
    87% (46)

Why each option

By default, GPG stores and searches for public keys, which are essential for verifying digital signatures, in the `~/.gnupg/pubring.gpg` file.

A~/.gnupg/trustdb.gpg

`~/.gnupg/trustdb.gpg` stores the GnuPG trust database, which records the trust relationships between keys and their owners, not the public keys themselves.

B~/.gnupg/secring.gpg

`~/.gnupg/secring.gpg` (or `~/.gnupg/private-keys-v1.d/` in modern GnuPG versions) is where private keys are stored, used for signing or decryption, not for verifying others' signatures.

C~/.gnupg/trustedkeys.gpg

`~/.gnupg/trustedkeys.gpg` is not the default primary public keyring; while it can be used for specific trusted keys, `pubring.gpg` is the main repository for public keys.

D~/.gnupg/pubring.gpgCorrect

The `~/.gnupg/pubring.gpg` file is the default and primary keyring where GnuPG stores all public keys, which are necessary to authenticate the origin and integrity of signed files or to encrypt data for others.

Concept tested: GPG public keyring location

Source: https://gnupg.org/documentation/manuals/gnupg/GnuPG-Files.html

Topics

#GnuPG#Keyrings#Digital Signatures#File Verification

Community Discussion

No community discussion yet for this question.

Full LFCS Practice