LPIC-2 System Security Practice Question
A system administrator wants to verify the integrity of a downloaded package using a GPG signature. Which command should be used after importing the distributor's public key?
⚠ Common exam trap
Many exam-takers confuse `--verify` with `--decrypt`, as both involve `.asc` files, but `--decrypt` is only for encrypted messages, not signature verification.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
gpg --verify package.tar.gz.asc package.tar.gz
The `--verify` option is used to check the authenticity and integrity of a file against a detached GPG signature file. After importing the distributor's public key, running `gpg --verify package.tar.gz.asc package.tar.gz` confirms that the package was signed by the corresponding private key and has not been altered since signing.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
gpg --encrypt package.tar.gz
Why it's wrong here
Encryption is unrelated to signature verification.
- ✓
gpg --verify package.tar.gz.asc package.tar.gz
Why this is correct
This verifies the detached signature against the file.
- ✗
gpg --decrypt package.tar.gz.asc
Why it's wrong here
Decryption does not verify integrity or authenticity.
- ✗
gpg --sign package.tar.gz
Why it's wrong here
This would sign the file, not verify it.
Go deeper
Related to this question
About these practice questions
One of 507 original LPIC-2 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This LPIC-2 practice question is part of Courseiva's free LPI certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the LPIC-2 exam.