如何通过 CLI 在存储库中搜索可用软件?

Ufo*_*guy 1 command-line apt search package-management repository

我希望能够像使用“Synaptic Package manager”或“Ubuntu Software Center”一样通过命令行搜索所有可用的软件。`

在“sudo apt-get install”之后输入几个字母后,我想要一个比按 Tab 更好的方法。这是不够的,不能像新立得包管理器那样深入搜索。

rep*_*lay 7

您可以使用apt-cache search. 例如搜索火狐:

apt-cache search firefox
Run Code Online (Sandbox Code Playgroud)

这是来自man 8 apt-cache以下内容的相应片段:

   search regex [ regex ... ]
       search performs a full text search on all available package lists 
       for the POSIX regex pattern given, see regex(7). It searches the 
       package names and the descriptions for an occurrence of the regular
       expression and prints out the package name and the short description, 
       including virtual package names. If --full is given then output 
       identical to show is produced for each matched package, and if 
       --names-only is given then the long description is not searched, 
       only the package name is.

       Separate arguments can be used to specify multiple search patterns 
       that are and'ed together.
Run Code Online (Sandbox Code Playgroud)