Where are the Terminal settings stored on OS X?

The preferences appear to be at: ~/Library/Preferences/com.apple.Terminal.plist

See also this question on SO and another question on SU that focus on exporting the settings from one Mac and moving them to another.

  • https://stackoverflow.com/questions/8350065/
  • http://superuser.com/questions/204686/

For older macOS, you can edit the file directly but on newer OS (with newer being 10.9 and later) you will want to use the defaults command to write the values to the persistent database (which may or may not flush back changes to the filesystem) rather than editing the file.

defaults read com.apple.Terminal

Or to write the secure keyboard entry function (as one easy example):

defaults write com.apple.Terminal SecureKeyboardEntry 1