Disable ‘Preferences’ menu option in OS X Finder

It is possible to disable the OS X Finder menu option: ‘Finder ▸ Preferences’ (cmd⌘ + ,). This will prohibit setting changes in the OS X Finder application.

defaults write com.apple.finder ProhibitFinderPreferences -bool true

To make the command take effect, you need to restart the Finder.

killall Finder

Revert to the default setting:

defaults write com.apple.finder ProhibitFinderPreferences -bool false