LFCS Certification Software Package Management 3 — Questions and Answers
Question 1: Which command verifies the GPG signature of an RPM package file before installing it?
- rpm --checksig package.rpm (Correct answer)
- rpm -V package.rpm
- rpm --verify --signature package.rpm
- gpg --verify package.rpm
Correct answer: rpm --checksig package.rpm
`rpm --checksig` (or `-K`) checks the GPG and MD5 signatures of an RPM file to confirm authenticity.
Question 2: On Ubuntu, how would you prevent a package from being upgraded during `apt upgrade`?
- apt-mark hold <package> (Correct answer)
- apt pin <package>
- dpkg --hold <package>
- echo '<package> hold' | dpkg --set-selections
Correct answer: apt-mark hold <package>
`apt-mark hold` places a hold on a package, preventing APT from automatically upgrading it.
Question 3: What does `dnf module enable <module>:<stream>` do?
- Activates a specific module stream so its packages become available for installation (Correct answer)
- Installs all packages in a module stream immediately
- Makes a module stream the system default permanently
- Enables a disabled DNF plugin
Correct answer: Activates a specific module stream so its packages become available for installation
Enabling a module stream makes that version's packages visible to DNF without installing anything yet.
Question 4: Which file format does `apt` use to authenticate repository packages?
- ASCII-armored GPG key files (.gpg or .asc) stored in /etc/apt/trusted.gpg.d/ (Correct answer)
- X.509 certificates stored in /etc/ssl/certs/
- SHA256 checksums stored in /etc/apt/checksums/
- RPM-style signature headers embedded in .deb files
Correct answer: ASCII-armored GPG key files (.gpg or .asc) stored in /etc/apt/trusted.gpg.d/
APT uses GPG keys stored in /etc/apt/trusted.gpg.d/ to verify the authenticity of repository Release files.
Question 5: What is the output of `rpm -qf /usr/bin/vim`?
- The name of the package that owns /usr/bin/vim (Correct answer)
- A list of all vim binary files
- The version of vim installed
- The dependencies required by vim
Correct answer: The name of the package that owns /usr/bin/vim
`rpm -qf <file>` performs a reverse lookup, returning the package name that owns the specified file.
Question 6: Which APT command downloads a package's source code along with its build dependencies?
- apt-get source --build <package>
- apt-get install --source <package>
- apt source <package> (Correct answer)
- apt-get build-dep <package>
Correct answer: apt source <package>
`apt source <package>` downloads and unpacks the source package from the configured deb-src repository.
Question 7: When using `zypper` on SUSE/openSUSE, which command searches for packages by name?
- zypper search <pattern> (Correct answer)
- zypper find <pattern>
- zypper query <pattern>
- zypper lookup <pattern>
Correct answer: zypper search <pattern>
`zypper search` (or `zypper se`) searches package names, summaries, and descriptions in configured repositories.
Which command verifies the GPG signature of an RPM package file before installing it?