THE Dock is one of the fundamental elements of the user interface macOS. In addition to serving as a feature for quick launching of apps, it is fully customizable: you can add and remove items, change its size, its position (at the bottom or the sides) of the screen, or even if it is 100% visible or not.
Precisely because of the countless possibilities that exist, it may be that, accidentally, you make some unwanted change – it can hinder certain work or even ruin what you had organized.
If you want to prevent these changes, know that you can lock the Dock in order to keep it the way you use it daily. This option, however, is not available after some adjustment in the System Preferences interface, but through the Terminal – but no, configuring it is not complicated.
In addition to being able to block the Dock completely, it is possible to restrict so that only certain types of changes are made, such as size, position and / or content. Check how to block each one below:
Locking the Dock Size
To block the size of the Dock, copy and paste the command below into the Terminal – if you don’t know what the Terminal is, just digital “terminal” in the search for macOS (menu bar) to view it.
defaults write com.apple.Dock size-immutable -bool true; killall Dock
After entering the code above, press the Enter key to apply it. That done, if you try to resize the Dock, you will see that this change is no longer possible. In System Preferences, the option to adjust the size of the Dock is also inaccessible.
To re-enable the resizing of the Dock, enter this other code in the Terminal:
defaults write com.apple.Dock size-immutable -bool false; killall Dock
Likewise, press Enter and it will be possible to readjust the size of the Dock.
Lock Dock Position
It is possible to position the Dock at the bottom, left or right of the screen; any of these positions start from the preference and taste of each one, but if you need the Dock to be in a specific place without the possibility of alteration, open the Terminal and enter the following command:
defaults write com.apple.Dock position-immutable -bool true; killall Dock
Hit Enter to apply the change; once this is done, the Dock can no longer be repositioned and the respective setting of System Preferences is blocked.
To re-enable the repositioning of the Dock, enter this code in the Terminal and press Enter:
defaults write com.apple.Dock position-immutable -bool false; killall Dock
Lock the contents of the Dock
Last but not least, you can prevent apps from being added, rearranged, or removed from the Dock with the following command:
defaults write com.apple.Dock contents-immutable -bool true; killall Dock
Then press Enter to confirm. That done, you can no longer add or remove apps from the Dock; in addition, the options “Keep in Dock” and “Remove from Dock” are unavailable in app icons.
As with other locks, enter this other code to allow changes to the content of the Dock to be made again:
defaults write com.apple.Dock contents-immutable -bool false; killall Dock
Press Enter and voila!
· • ·
If you take the time to organize and customize your Dock exactly the way that suits you, the last thing you want is for someone to change it; therefore, these simple commands help to keep everything in order.
Check out other tips on iOS, iPadOS, macOS, watchOS and tvOS in our tutorials section.