• Tip Jar

Command Line Spell Checker

Sometimes you may want to spell check a word without having to open a browser or a word processor. In a situation the command line can once again come to the rescue. To get the spell checker, in a terminal, type:
sudo apt-get install hunspell hunspell-en-us
After the installation has completed you can do:
hunspell
and type in each word you want checked. If the word is spelled correctly it will display *. If the word is not correct it will offer suggestions. Another way to check a word is to type:
echo “word” | hunspell
To make things even easier, you can create a file named spellcheck in ~/bin/ and add the following lines:
#!/bin/bash
echo “$@” | hunspell
exit 0
Save the file and change its permissions by typing:
chmod 700 ~/bin/spellcheck
Now you can check words by typing:
spellcheck word to check
the above line should yield 3 * symbols. So, the next time you need to check a single word to paste in to an application, open a terminal and get the correct spelling in a few seconds.

  • Tip Jar