Generate a new OpenPGP key pair while choosing algorithm, key size, expiration, and user ID interactively.
Which command is appropriate?
gpg --full-generate-key opens detailed interactive prompts for the algorithm, capabilities, expiration, and identity of a new OpenPGP key.
Detailed explanation
gpg --importIncorrect. --import brings existing key data into a keyring.
Incorrect. --import brings existing key data into a keyring.
gpg --list-keysIncorrect. --list-keys displays the public keyring.
Incorrect. --list-keys displays the public keyring.
gpg --full-generate-keyCorrect. It interactively generates a detailed OpenPGP key pair.
Correct. It interactively generates a detailed OpenPGP key pair.
gpg --verifyIncorrect. --verify checks a signature.
Incorrect. --verify checks a signature.
Try it yourself
An example you can run in a temporary verification environment.
printf '%s
' '--full-generate-key=create key interactively' '--import=add existing key' '--list-keys=list public keys' '--verify=check signature'Expected result
--full-generate-key=create key interactively
--import=add existing key
--list-keys=list public keys
--verify=check signatureKey points
- Generate a key pair
- Set user ID and expiry
- Protect the private key
Notes
- Environment: GnuPG command対応表(key生成なし)
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.