Install aspell on Ubuntu 22.04

Install aspell on Ubuntu 22.04

The aspell is a command line tool that can be used to check spelling errors for a given text file or individual words provided from standard input. This tool displays misspellings and allows the user to choose potential corrections from a list.

This tutorial demonstrates how to install aspell on Ubuntu 22.04.

Install aspell

Type the following command to update the package lists:

sudo apt update

Install aspell:

sudo apt install -y aspell

Check aspell version as follows:

aspell --version

Testing aspell

For testing purpose, create a file:

echo "This content will be cheked for speling errors" > test.txt

Run the aspell command with -c option and give the filename.

aspell -c test.txt

The aspell highlights spelling mistakes and allows choosing correction from a list.

Correcting Spelling Errors using aspell on Ubuntu

The -a option can be used to check individual words. If the user enters a misspelled word, the aspell outputs spelling suggestions.

aspell -a

Note: to quit aspell, press CTRL+D.

Uninstall aspell

If the aspell is no longer needed, remove it with related dependencies by running the following command:

sudo apt purge --autoremove -y aspell

Leave a Comment

Cancel reply

Your email address will not be published.