Where are the Terminal settings stored on OS X? You'd think A) I'd know this by now, and B) that it's readily available info, but apparently neither is the case. 

What I'm looking for is where the config files (colors, etc.) that ship with Terminal are kept on the system. It'd be really handy to point to these in a /dotfiles/setup.sh file. 

Am I being oblivious? I've checked the package contents of Terminal.app, but nothing is there of note. It is also noteworthy, that OS X (at least Mountain Lion) will include Terminal settings, sessions, and scripts as pre-defined search parameters in Finder, but I have found nothing. 

I've searched online, and dug deep into /usr/ and /Library. Nothing. Any help would be much appreciated. Thanks.
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