GNU+Linux command memo

command-not-found: which package to install then ? (and variations)

Chercher dans quel paquet trouver la commande manquante que l’on vient d’entrer.

1. command-not-found package

# apt install command-not-found
# update-command-not-found (1)
$ echo ". /etc/zsh_command_not_fonud" >> ~/.zshrc (2)
1 command-not-found needs its own list of packages (explained in /usr/share/doc/command-not-found/README.Debian)
2 Instruct your shell about « command not found » new reaction. Exists also in bash version as explained in /usr/share/doc/command-not-found/README.

The 2ping command is missing on my system, if I try to invoke it :

$ 2ping
zsh: correct '2ping' to 'ping' [nyae]? n (1)
zsh: command not found: 2ping (2)
The program '2ping' is currently not installed.  To run '2ping' please ask your administrator to install the package '2ping' (3)
1 zsh offers a correction (as I have ENABLE_CORRECTION="true" in my ~/.zshrc)
2 But the command I really want does not exist.
3 command-not-found list the package that installs the command.

Limitation : it’s only working with packages from the main archive.

2. Debian packages search engine

There is a "Search the contents of packages" part in the page with an option "packages that contain files named like this".

This search engine can be added to Firefox default search engines.

3. packagesearch command

packagesearch is GUI for searching packages and viewing package information

There’s a filter to search in file names of packages.