Any way to list similar commands?

Bash uses the command /usr/lib/command-not-found for looking similar commands. This in turn uses Python's CommandNotFound module.

The output you see on the terminal(stderr in this case), is also generated from this module. The location of this module is /usr/lib/python3/dist-packages/CommandNotFound/CommandNotFound.py, on Ubuntu 14.04 and up. There is a default limit set on number of similar commands in the function CommandNotFound.print_spelling_suggestion(self, word, min_len=3, max_len=15) on line 138. You can modify the max_len value to say 30 (Use sudo nano or gksudo gedit to edit this file).


It's quite likely that the 23 "similar" commands would not be much more use to you than 'goo', 'god', and 'gord'. The little trick most bash'ers use to find things is to use the man pages since the search is content based rather than just by name. For example, try

man -k ftp

If you find a likely or insteresting command look at the man page itself by dropping the -k switch:

man sftp

man has it's own manual page:

man man

Now you know why, whenever you install a new program or application it very often installs a man page for you as well.

Oh yes, to search in or for man pages you haven't installed yet you might like one of the many online man sites such as this one.