OS Manuals

/usr/bin/hunspell

Spell checker and morphological analyzer library and program

From hunspell 1.7.6-r0 (os), captured 2026-11-05 by running hunspell --help (exit 0). permalink

Usage: hunspell [OPTION]... [FILE]...
Check spelling of each FILE. Without FILE, check standard input.

  -1		check only first field in lines (delimiter = tabulator)
  -a		Ispell's pipe interface
  --check-url	check URLs, e-mail addresses and directory paths
  --check-apostrophe	check Unicode typographic apostrophe
  -d d[,d2,...]	use d (d2 etc.) dictionaries
  -D		show available dictionaries
  -G		print only correct words or lines
  -h, --help	display this help and exit
  -H		HTML input file format
  -i enc	input encoding
  -l		print misspelled words
  -L		print lines with misspelled words
  -m 		analyze the words of the input text
  -n		nroff/troff input file format
  -O		OpenDocument (ODF or Flat ODF) input file format
  -p dict	set dict custom dictionary
  --no-default-personal
		don't use the default personal dictionary
  -r		warn of the potential mistakes (rare words)
  -P password	set password for encrypted dictionaries
  -s 		stem the words of the input text
  -S 		suffix words of the input text
  -t		TeX/LaTeX input file format
  --trace	report how each input word was decided
  -u		print the line number, misspelled word and first suggestion
  -U		print the input text with each misspelled word replaced by its
		first suggestion
  -u2		print the replacements that -U would make, as a sed script
  -u3		print the file name and line number with each misspelled word
  -v, --version	print version number
  -vv		print Ispell compatible version number
  -w		print misspelled words (= lines) from one word/line input.
  -X		XML input file format

Example: hunspell -d en_US file.txt    # interactive spelling
         hunspell -i utf-8 file.txt    # check UTF-8 encoded file
         hunspell -l *.odt             # print misspelled words of ODF files

         # Quick fix of ODF documents by personal dictionary creation

         # 1 Make a reduced list from misspelled and unknown words:

         hunspell -l *.odt | sort | uniq >words

         # 2 Delete misspelled words of the file by a text editor.
         # 3 Use this personal dictionary to fix the deleted words:

         hunspell -p words *.odt

Bug reports: http://hunspell.github.io/
Options (31)
OptionDescriptionSource
-1Check only the first field on each line (delimiter = tab).help + man
-aThe -a option is intended to be used from other programs through a pipe.help + man
--check-urlCheck URLs, e-mail addresses and directory paths.help + man
--check-apostropheCheck and force Unicode apostrophes (U+2019), if the spelling dictionary specifies either the ASCII or the Unicode apostrophe as a word character (see WORDCHARS, ICONV and OCONV in hunspell(5)).help + man
-d den_US and de_DE are base dictionaries;help + man
-DShow the detected path of the loaded dictionary, the search path, and the available dictionaries.help + man
-GPrint only correct words or lines.help + man
-h, --helpdisplay this help and exithelp + man
-HThe input file is in SGML/HTML format.help + man
-i encinput encodinghelp
-lThe "list" option is used to produce a list of misspelled words from the standard input.help + man
-LPrint lines with misspelled words.help + man
-mAnalyze the words of the input text (see also hunspell(5) about morphological analysis).help + man
-nThe input file is in nroff/troff format.help + man
-OThe input file is in OpenDocument (ODF or Flat ODF) format.help + man
-p dictset dict custom dictionaryhelp
--no-default-personalDon't use the default personal dictionary.help + man
-rWarn of rare words, which are also potential spelling mistakes.help + man
-P passwordset password for encrypted dictionarieshelp
-sStem the words of the input text (see also hunspell(5) about stemming).help + man
-Ssuffix words of the input texthelp
-tThe input file is in TeX or LaTeX format.help + man
--traceReport how each word of the input text was decided, for the use of dictionary developers.help + man
-uFor each misspelled word that has a suggestion, print the line number, the word itself and the first suggestion.help + man
-UPrint the input text to the standard output with each misspelled word replaced by its first suggestion.help + man
-u2Print the replacements that -U would make as a sed script, one substitution per line, each followed by the original line as a comment.help + man
-u3Print one line for each misspelled word, giving the name of the file, the line number, the word, and the first suggestion when there is one.help + man
-v, --versionPrint version number.help + man
-vvPrint ispell(1) compatible version number.help + man
-wprint misspelled words (= lines) from one word/line input.help + man
-XThe input file is in XML format.help + man

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.