does linux have a "did you mean......" component for the command line like Google?

Bruce Marshall bmarsh at
Fri Nov 16 16:12:16 UTC 2007

On Friday 16 November 2007, John Toliver wrote:
> You know how when you type something that may be misspelled and Google
> comes back with "Did you mean this?" spelling properly what you were
> trying to search for.  Can I install a package that lets me get to the
> command I am looking for even  if I happen to mis a letter? For example
> smbpaswd vs. smbpasswd.  Big difference when trying to get the system to
> play nice in a windows network.

Bash has a command:

shopt -s cdspell

that I put in my .bashrc file.   If, for example, you mispell:

cd /backup   as follows:

root at linux1:/# cd /bckup
root at linux1:/backup#

note that it picked the right directory before it executed the command.

More information about the ubuntu-users mailing list