aspell command in Linux with examples

aspell command is used as a spell checker in Linux. Generally, it will scan the given files or anything from standard input then it check for misspellings. Finally it allows the user to correct the words interactively.


aspell check [options] filename


  • -a : To check individual words.
  • -c : Check a file for specific error.
  • -mode=mode : The modes we have to use when checking files.
  • -master=name : It is the main dictionary to use.
  • -dont-backup : It doesn’t create a backup file.
  • -encoding=name :Encoding the file is expected to be in.
  • -lang=name -l name : It describes the language the document is written in. By default it depends on the current locale.
  • -sug-mode=mode : The Suggestion Mode.

Example 1: Check a file for spelling errors

aspell -c sample.txt

Sample Text

Example 2: Using aspell to check individual words.

aspell -a

Note: As soon as you run this command, it will wait for user input. Type a word in this mode, press enter, and you’ll see aspell offering spelling suggestions on stdout.

Example 3: Using aspell to check words in bulk. When run, will wait for user input. Add as many words as you want, and when done, press Ctrl+D. Then you’ll see that aspell will display incorrectly spelled words below the input you provided.

My Personal Notes arrow_drop_up

If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.