Stop autocorrect changing technical terms on Mac
You type kubectl and macOS swaps it for a real word; nginx, psql, a product name, a client's surname — autocorrect "fixes" all of them because they aren't in its dictionary. You have two clean options: turn spelling correction off entirely, or keep it and teach it the terms you use. Both live in System Settings → Keyboard → Text Input → Edit.
Turn autocorrect off
- Open System Settings → Keyboard.
- In the Text Input section, click Edit….
- Turn off Correct spelling automatically.
- Click Done.
To do it from the command line — handy when setting up a new machine — one key controls it:
# stop macOS auto-correcting as you type
defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false
# undo — turn autocorrect back on
defaults delete NSGlobalDomain NSAutomaticSpellingCorrectionEnabled
No logout is required; quit and reopen the app you're typing in so it re-reads the setting. This behaves the same on macOS 13 Ventura, 14 Sonoma, and 15 Sequoia.
Or keep autocorrect and teach it your terms
If autocorrect helps you elsewhere, you don't have to give it up wholesale. Teach it the words it keeps mangling instead:
- Learn Spelling — right-click (or Control-click) a word with the red underline and choose Learn Spelling. macOS stops flagging and rewriting it everywhere.
- Text Replacement — in System Settings → Keyboard → Text Replacements, add the term as both the phrase and its replacement so it can never be "corrected." This is ideal for a handful of product names or commands you type constantly.
These are surgical: you keep correction for ordinary prose and only protect the vocabulary that matters. Our guide to text replacement on Mac covers syncing those entries across your devices.
Mainspring makes autocorrect a labelled one-click toggle you can turn off and back on anytime — one of 90+ hidden macOS settings it exposes as reversible switches, so jargon stays exactly as you typed it.
Try Mainspring free →Signed & notarized by Apple · 1-day free trial · $29 once
Correction off, but words still underlined?
Turning off automatic correction stops macOS from silently rewriting words, but it doesn't remove the red spell-check underline — that's a separate, per-app option under each app's Edit → Spelling and Grammar menu (uncheck Check Spelling While Typing). Leave the underline on and you get a heads-up without the surprise substitutions. For the full teardown, see how to turn off autocorrect on Mac.