aspell: command not found

aspell is a command-line utility for spell checking and correcting text. It is commonly used in Unix-like operating systems such as Linux and macOS. aspell checks the spelling of a text file and suggests corrections for misspelled words. It can also be used to create a personal dictionary of words to be ignored during spell checking.

To use aspell, you need to have it installed on your system. On most systems, you can install aspell using the package manager. For example, on a Debian-based system, you can use the following command to install Aspell:

# apt-get install aspell

Once Aspell is installed, you can use it to check the spelling of a text file by running the following command:

# aspell check file.txt

Aspell will scan the file and flag any misspelled words. It will also suggest corrections for each misspelled word. You can use the –mode option to specify the language of the text. For example, to check the spelling of a French text file, you can use the following command:

# aspell --mode=fr check file.txt

Aspell also provides a number of options for customizing the spell checking process, such as ignoring words with certain capitalization or ignoring words that are in all uppercase. You can view the full list of options by running aspell –help.

If you encounter the below error while running the aspell command:

aspell: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
OS X brew install aspell
Debian apt-get install aspell
Ubuntu apt-get install aspell
Alpine apk add aspell
Arch Linux pacman -S aspell
Kali Linux apt-get install aspell
CentOS yum install aspell
Fedora dnf install aspell
Raspbian apt-get install aspell

aspell Command Examples

1. Spell check a single file:

# aspell check path/to/file

2. List misspelled words from standard input:

# cat file | aspell list

3. Show available dictionary languages:

# aspell dicts

4. Run `aspell` with a different language (takes two-letter ISO 639 language code):

# aspell --lang=cs

5. List misspelled words from standard input and ignore words from personal word list:

# cat file | aspell --personal=personal-word-list.pws list
Related Post