Lock the Dock in Mac OS X
If you need to prevent the Dock icons from changing or being modified on a Mac, you can use defaults command strings to lock down the OS X Dock and prevent any adjustments or changes to how it appears on screen.
To get started, open the Terminal app and then issue the appropriate syntax at the command line, depending on what you’d like to do. Keep in mind these changes are at a user-level. Here’s how to lock down the Dock on any Mac with OS X.
How to Lock the Dock to Prevent Changes to Contents
defaults write com.apple.Dock contents-immutable -bool yes
Lock the Dock to Prevent Changes in Size
defaults write com.apple.Dock size-immutable -bool yes
Lock the Dock’s Position on the Screen
defaults write com.apple.Dock position-immutable -bool yes
After executing any or all of these commands, you’ll want to relaunch the Dock by killing it:
The Dock will reload itself and the changes will be in effect. Your Dock is now locked!
Why would you want to lock the Mac OS X Dock? If you’re a Systems Administrator or IT Technician, you can make your life a lot easier by having machines stay consistent. One good way to add to consistency across Mac’s is to lock down the Dock to prevent changes in it’s position, keep the contents in place, and to ensure that the size is the same. Now when you’re trying to remotely describe to someone how to open an application, you can be sure it is located exactly where you left it in the Dock.