Short answer: the same four commands still work on macOS 26. Nothing about locking the Dock changed.
What did change is where the settings live in System Settings, which is why older guides send you to a pane that no longer exists.
defaults write com.apple.dock size-immutable -bool true
defaults write com.apple.dock position-immutable -bool true
defaults write com.apple.dock contents-immutable -bool true
defaults write com.apple.dock autohide-immutable -bool true
killall Dock
These four keys have worked for over fifteen years and macOS 26 does not touch them. Swap
true for false to release any one of them. Our free
command generator writes the exact set for whichever locks you want,
with the undo commands alongside.
The old System Preferences pane called "Dock & Menu Bar" is gone. On macOS 26 the Dock lives in System Settings › Desktop & Dock, and the controls you will care about are at the very top: size, magnification, position on screen, and automatically hide and show.
This matters for one reason: once you run the commands above, those exact controls stop responding. That is the lock working, not a bug, and it is the thing people search for months later having forgotten they did it. See why the Dock settings are grayed out.
Three claims turn up in macOS 26 articles that were not true in earlier versions and are still not true:
top orientation. orientation accepts
left, bottom and right. It has never accepted
top.defaults write com.apple.symbolichotkeys recipe for disabling ⌘Tab edits nothing,
because the switcher is not in that list. We checked: 23 hotkeys are defined and none of them use
keycode 48. See disabling ⌘Tab.The commands do not. They write your own preferences and restart your own Dock, and no
Accessibility or Full Disk Access prompt appears. Do not use sudo with them; these are per
user settings and running them as root writes to the wrong account.
Yes. They are user preferences, not system files, so an update leaves them alone. They survive Migration Assistant to a new Mac too.
Both. This is a preferences mechanism, not a binary, so the architecture is irrelevant.
macOS 13 or later, on Apple silicon. Most of our testing is on macOS 26.
If you would rather not keep a list of commands, Still Dock is the same four settings as switches, and it remembers the Dock you had before you locked it. The size lock is free.