
The Mac Dock in the Apple Macintosh MacOs operating system is programmed by default so that it is not locked. This allows you to add or remove icons from the dock as you wish.
As the icons are often accidentally pulled down from the dock, many Mac users want to lock the dock to prevent this. You can easily lock the Dock manually and unlock it again later.
To lock the dock, open the terminal. If you do not know where the terminal is, simply enter it in the search field and open it from there. Copy and paste the following command into the terminal:
defaults write com.apple.dock contents-immutable -bool true
osascript -e 'tell application "Dock" to quit'
Close the terminal with the x, the command is automatically saved. The dock is locked when the computer is restarted.
To unlock the dock, open the terminal (see above). Copy and paste the following command into the terminal:
defaults write com.apple.dock contents-immutable -bool false
osascript -e 'tell application "Dock" to quit'
Close the terminal and restart the computer. The dock is now unlocked.
