This article discusses the various spellchecking commands available in Linux which can be accessed from the command line.
Linux has several spellcheckers built in. If you’re accustomed to graphical spellcheckers, you might find Linux’s text-based ones fairly primitive, but they can be used in pipelines, which is quite powerful.
look [options] prefix [dictionary_file]
The look command prints (on standard output) words that begin with a given string
prefix. The words are located in a dictionary file (default /usr/share/dict/words) as follows.
If you supply your own dictionary file – any text file with alphabetically sorted lines – look will print all lines beginning with the given
-t XMatch the prefix only up to and including the termination character
X. For instance, look
-t i bigprints all words beginning with “bi”.
aspell [options] file | command
The aspell tool is an interactive spellchecker. It identifies words that it doesn’t recognize and presents alternatives. A few useful commands are as follows.
aspell -c fileInteractively check, and optionally correct, the spelling of all words in file.
aspell dump masterPrint aspell ’s master dictionary on standard output.
aspell helpPrint a concise help message.
The spell command prints all words in the given files that are misspelled, according to its dictionary (it is not interactive) for instance.
This Linux file has some spelling errors. You may naturaly wonder if a spelling checker will pick them up. Careful Linuxx users should run thier favorite spelling checker on this file.
naturaly Linuxx thier
This article has presented the most common Linux spellchecking commands and options that can be accessed at the command line.