tool_1.0_amd64.deb is in the current directory.
Install it with APT and resolve dependencies from configured repositories when needed.
Which command is appropriate?
apt install ./file.deb recognizes the path as a local deb and uses APT dependency handling for the installation.
Detailed explanation
apt install ./tool_1.0_amd64.debCorrect. The ./ path tells APT to install the local deb and resolve dependencies.
Correct. The ./ path tells APT to install the local deb and resolve dependencies.
apt show ./tool_1.0_amd64.debIncorrect. apt show displays metadata and does not install the file.
Incorrect. apt show displays metadata and does not install the file.
apt-file list ./tool_1.0_amd64.debIncorrect. apt-file queries Contents indexes and does not install a deb.
Incorrect. apt-file queries Contents indexes and does not install a deb.
apt update ./tool_1.0_amd64.debIncorrect. apt update refreshes repository indexes rather than installing a local file.
Incorrect. apt update refreshes repository indexes rather than installing a local file.
Try it yourself
An example you can run in a temporary verification environment.
apt-get --help | grep -E 'install' | head -n 1Expected result
install操作が表示される。実際の導入は行わないKey points
- ./ identifies a local path
- APT resolves dependencies
- A local package is still installed
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.