Search package names and descriptions for the term websocket.
The task is not to find which package provides a file path.
Which command is appropriate?
apt search TERM searches names and descriptions of available packages. apt-file search is for path providers.
Detailed explanation
apt show websocketIncorrect. apt show expects a package name and displays its details.
Incorrect. show requires a known package name and is not a broad capability search.
apt search websocketCorrect. apt search websocket finds matching package names and descriptions.
Correct. search matches the term in package names and descriptions.
apt-file search websocketIncorrect. apt-file search queries Contents paths.
Incorrect. apt-file search searches archive paths, not descriptions.
apt list --installed websocketIncorrect. This filters installed packages rather than searching descriptions.
Incorrect. --installed limits results to packages already installed.
Try it yourself
An example you can run in a temporary verification environment.
apt search websocket 2>/dev/null | sed -n '1,8p'Expected result
検索語に関連するパッケージ名と短い説明(索引により異なる)Key points
- apt search covers names and descriptions
- show expects a known package
- apt-file search searches paths
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
Capability discovery starts with an index search; detailed inspection follows after a candidate name is found.
Check the side effect
Search for a capability, then use show to verify dependencies and size.