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 form identifies the local deb and APT resolves dependencies.
apt show ./tool_1.0_amd64.debIncorrect. apt show displays metadata and does not install the file.
Incorrect. show only displays metadata.
apt-file list ./tool_1.0_amd64.debIncorrect. apt-file queries Contents indexes and does not install a deb.
Incorrect. apt-file list reads repository Contents data.
apt update ./tool_1.0_amd64.debIncorrect. apt update refreshes repository indexes rather than installing a local file.
Incorrect. update refreshes indexes and does not install a local archive.
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 / 構文確認のみ
- Use a disposable environment or simulation before package changes.
- APT behavior can vary with repository configuration and package-manager version.
Foundation review
Place the operation
A path such as ./file.deb tells APT to install the local archive while its resolver obtains missing dependencies.
Check the side effect
Use a disposable local archive and review the dependency transaction before installation.