Inspect the installed bash package's name, version, release, and description.
Query the RPM database.
Which command is appropriate?
rpm -qi PACKAGE queries installed-package information such as name, version, release, architecture, and description.
Detailed explanation
rpm -ql bashIncorrect. -ql lists files owned by the package.
Incorrect. -ql lists files owned by the package.
rpm -qR bashIncorrect. -qR lists required capabilities and packages.
Incorrect. -qR lists required capabilities and packages.
rpm -qf bashIncorrect. -qf finds the package that owns a file path.
Incorrect. -qf finds the package that owns a file path.
rpm -qi bashCorrect. rpm -qi bash displays installed-package metadata.
Correct. rpm -qi bash displays installed-package metadata.
Try it yourself
An example you can run in a temporary verification environment.
rpm --help | grep -E -- '--info|-i'Expected result
query用infoオプションの説明Key points
- -q means query
- -i means info
- The argument is an installed package name
Notes
- Environment: RPM 4.19〜6.x公式仕様
- 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.