nerdexam
Linux_Foundation

LFCS · Question #400

Which GPG command is used to sign a public key? (Select TWO correct answers)

The correct answer is B. gpg signkey UID D. gpg editkey UID followed with the sign command. To sign a public key using GPG, you can either directly use the gpg --sign-key UID command or enter the key editing menu with gpg --edit-key UID and then use the sign command within that interface.

Submitted by tarun92· Apr 18, 2026Essential Commands

Question

Which GPG command is used to sign a public key? (Select TWO correct answers)

Options

  • Agpg signpublickey UID
  • Bgpg signkey UID
  • Cgpg sign UID
  • Dgpg editkey UID followed with the sign command.
  • Egpg editkey UID followed with the confirm command.

How the community answered

(34 responses)
  • B
    91% (31)
  • C
    6% (2)
  • E
    3% (1)

Why each option

To sign a public key using GPG, you can either directly use the `gpg --sign-key UID` command or enter the key editing menu with `gpg --edit-key UID` and then use the `sign` command within that interface.

Agpg signpublickey UID

`gpg signpublickey` is not a standard GPG command for signing public keys.

Bgpg signkey UIDCorrect

The `gpg --sign-key UID` command directly instructs GPG to sign the public key associated with the specified User ID (UID), often prompting for confirmation.

Cgpg sign UID

`gpg sign UID` is typically used to sign a *file* with your private key, not to sign another public key itself.

Dgpg editkey UID followed with the sign command.Correct

The `gpg --edit-key UID` command enters an interactive key management menu where the `sign` command can be used to sign the currently selected public key.

Egpg editkey UID followed with the confirm command.

The `confirm` command in `gpg --edit-key` is used to confirm changes before saving, not to sign a key.

Concept tested: GPG key signing

Source: https://www.gnupg.org/gph/en/manual/x110.html

Topics

#GPG#Key Management#Public Key Cryptography#Signing Keys

Community Discussion

No community discussion yet for this question.

Full LFCS Practice