Looking for the app itself? Still Dock locks your Mac's Dock with switches.
Short answer: Terminal is free and fine for your own Mac. A configuration profile is the only one that survives someone trying to undo it. An app is the same locks with a switch and an undo.
All three use the same underlying macOS settings. What differs is how you set them and how hard they are to reverse.
macOS can lock the Dock. It just gives you no switch for it. The settings have been in macOS for over fifteen years, but they live in defaults write commands with no place
in System Settings, which is why most people never find them.
There are four locks, and each one works on its own:
The three ways to apply them follow, with what each one costs you.
| Terminal | Profile | App | |
|---|---|---|---|
| Costs money | No | No | Yes |
| Locks size, position, contents, hide | ✓ | ✓ | ✓ |
| Survives a restart | ✓ | ✓ | ✓ |
| Survives someone undoing it | ✕ | ✓ | ✕ |
| Applies to all user accounts | ✕ | ✓ | ✕ |
| Tells you it is on | ✕ | ✓ | ✓ |
| Remembers your old settings | ✕ | ✕ | ✓ |
| Changing your mind | Retype the command | Remove in Settings | Flip a switch |
Four commands, one per lock:
defaults write com.apple.dock size-immutable -bool true; killall Dock
The others are position-immutable, contents-immutable and autohide-immutable. The full guide covers all four, including the fifth one people repeat that does nothing.
Good when: it is your own Mac, you know what you want, and you will not need to change it often.
The catches. Each lock is a separate command with an exact key name, and a typo fails silently with no error. Changing your mind means going back to Terminal. Nothing records what your Dock looked like before, so if you lock it at the wrong size, you set the size again by hand. And System Settings goes gray with a message about a profile, which is confusing enough that people search for what went wrong months later.
A profile is what organizations use to manage Macs. It sits above user preferences, so it holds when a preference would not.
Good when: other people use the Mac. A front desk, a classroom, a shop display, a shared family machine.
The catches. You have to write the profile XML or use something that generates it. macOS asks you to approve each one. And it is deliberately harder to remove. It outlives the app that installed it, so you must remove it on purpose in System Settings, General, Device Management.
An app sets the same macOS settings, with switches.
Good when: you want to see what is locked, change it without looking anything up, and get your original setup back.
The catches. It costs money, and it is another thing running. What you get for that is visibility and reversibility: which locks are on, one click to change them, and a snapshot of the Dock you had before you locked it.
Still Dock, the app that locks your Mac's Dock, is ours, and it is the app-shaped way to lock the Mac Dock. It does the four locks, adds a display pin and a Cmd Q guard that Terminal cannot do at all, and can install the profiles from point 2 without you writing XML.
Using more than one screen? The Dock also jumps between them, which is a separate problem with its own fixes: how to keep the Mac Dock on one screen.
Yes. The settings exist in macOS and have for years. System Settings has no switch for them, so locking the Dock looks impossible. All three methods on this page set the same underlying settings.
Only if you lock the contents. The size, position and hide locks leave you free to rearrange the Dock as usual. Lock only what you want held.
Yes, all three ways. These are stored settings.
Yes. The Terminal route is free and it works, and our command generator writes the commands for you. You are paying for a switch, a label saying what is on, and a record of the Dock you had before.
The lock is working. macOS disables the control and says it is managed by a profile. The wording confuses people months later when they have forgotten they set the lock. See Mac Dock settings grayed out.
A profile wins over a Terminal setting. If your settings are grayed out and undoing the commands changes nothing, look for a profile.
For the four locks, no, and we say so on the home page. Pinning the Dock to one display and guarding Cmd Q are different mechanisms with no Terminal equivalent.
The preferences and profiles normally carry across. Apple can change Dock behavior in any release, which is true of all three approaches equally.
Run the size command. If freezing the size fixes your problem you may need nothing else. If you find yourself undoing and redoing it, that is your answer.
If you want the full list of keys as well as the locks, see every Mac Dock defaults command. For the multi-monitor problem specifically, DockLock and Still Dock compared covers the apps that solve it, LockMyDock included.