If you spend time customizing the Dock on your Mac, it can be aggravating when something gets changed by someone else. You may let a guest or your child use your computer and suddenly your Dock is positioned elsewhere, sized differently, or doesn’t have the apps you pinned to it.
To prevent your Dock from being messed with by another, you can lock it down using Terminal. We’ll show you the commands you need to lock the Dock’s position, size, and contents to prevent unwanted changes. So if you’re ready, here’s how to lock the Dock on your Mac.
Lock the Dock position
You can position the Dock on your Mac at the bottom or on the left or right. This location is a matter of preference and convenience. To make sure no one moves your Dock, open Terminal and enter the following command:
defaults write com.apple.Dock position-immutable -bool true; killall Dock
Hit your Return key to apply the change. Now your Dock cannot be repositioned and the option to do so is grayed out in the System Preferences > Dock area.
To allow repositioning of the Dock later, run the same Terminal command replacing “true” with “false”:
defaults write com.apple.Dock position-immutable -bool false; killall Dock
Lock the Dock size
Just like the position of your Dock, the size of it is important. You may keep minimal apps in the Dock and like it sized bigger or keep many apps in it and like it sized smaller. Either way, enter the following command into Terminal to lock the Dock size:
defaults write com.apple.Dock size-immutable -bool true; killall Dock
Hit your Return key to apply this change. If you try to resize the Dock, you’ll have no luck doing it! And like the position, the control for this option will also be grayed out in the Dock System Preferences.
To allow resizing of the Dock down the road, run the same Terminal command replacing “true” with “false”:
defaults write com.apple.Dock size-immutable -bool false; killall Dock
Lock the Dock contents
One more handy lockdown to perform on your Dock is for the contents. You can prevent apps from being added, rearranged, or removed from the Dock with the following Terminal command:
defaults write com.apple.Dock contents-immutable -bool true; killall Dock
Hit your Return key to apply the change and try to add, rearrange, or remove an app from the Dock. You can’t do it, can you? Plus, the Keep in Dock and Remove from Dock options are no longer available in the Dock app shortcut menu.
Like the other Dock lockdowns, you can undo this change later by entering the same command replacing “true” with “false”:
defaults write com.apple.Dock contents-immutable -bool false; killall Dock
Wrapping it up
If you take the time to personalize your Dock exactly the way that works best for you, then the last thing you want is for somebody to change it without you’re knowing. These simple Terminal commands can help you lock the Dock in less than a minute.
Are you going to use one or even all of these Terminal commands to lock your Mac Dock? If so, let us know!
If you have handy tips like these our readers should know about, remember, you can contact us on Twitter.