Use the APT indexes to inspect the packages required, recommended, or conflicting with bash.
Do not install anything.
Which command is appropriate?
apt-cache depends shows forward dependency relationships. apt-cache rdepends performs the reverse lookup of packages depending on the target.
Detailed explanation
apt-cache depends bashCorrect. apt-cache depends bash displays bash's dependency relationships.
Correct. apt-cache depends bash displays bash's dependency relationships.
apt-get depends bashIncorrect. apt-get does not provide this query subcommand.
Incorrect. apt-get does not provide this query subcommand.
dpkg -L bashIncorrect. dpkg -L lists files rather than dependencies.
Incorrect. dpkg -L lists files rather than dependencies.
apt-cache rdepends bashIncorrect. rdepends answers the reverse question, not the dependencies required by bash.
Incorrect. rdepends answers the reverse question, not the dependencies required by bash.
Try it yourself
An example you can run in a temporary verification environment.
apt-cache depends bash 2>/dev/null | headExpected result
bashのDepends、PreDepends、Suggests等(索引により異なる)Key points
- depends shows forward dependencies
- rdepends shows reverse dependencies
- The query does not change the system
Notes
- Environment: Debian系 / APT 2.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.