Inspect nginx description, dependencies, download size, and candidate version before installing it.
Do not change package state.
Which command is appropriate?
apt show displays package metadata such as description, dependencies, size, and candidate information without installing it.
Detailed explanation
apt install nginxIncorrect. apt install starts an installation.
Incorrect. apt install starts an installation.
apt show nginxCorrect. apt show nginx displays the package record.
Correct. apt show nginx displays the package record.
apt remove nginxIncorrect. apt remove deletes an installed package.
Incorrect. apt remove deletes an installed package.
apt update nginxIncorrect. apt update refreshes indexes rather than showing one package record.
Incorrect. apt update refreshes indexes rather than showing one package record.
Try it yourself
An example you can run in a temporary verification environment.
apt show apt 2>/dev/null | sed -n '1,8p'Expected result
Package、Version、Priority、Sectionなどの項目Key points
- show displays details
- No package state change
- Dependencies and size are visible
Notes
- Environment: 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.