Check your spellings on the Command Line Interface

The aspell command, from the aspell package is designed to spell check files. This package also provides the command spell, ispell, and run-with-aspell which call aspell in different ways.

For example, to check if the word "compatible" is correct, execute the command:

echo compatible|aspell -a

The output should be similar to:

@(#) International Ispell Version 3.1.20

This output shows that "compatible" is spelt correctly.

However, if you try to check the word "compatable," the output would be:

@(#) International Ispell Version 3.1.20
& compatable 5 0: compatible, computable, comparable,

This output shows that "compatable" is incorrect. Correctly spelled alternatives are listed as suggestions.

The spell command can be used to check for misspelled words in a file:

$ spell example.txt

This shows that the word "thr" is misspelled in the file.

The look command, from the util-linux package, lets you check a word on the command line against a list of correctly spelled words. By default, look references the list of words in "/usr/share/dict/words" from the words package.

For example, to check if "compatable" is spelled correctly:

$ look compatable

This returns no output, so "compatable" is not a correctly spelled word.