Brief #3 - macOS Dock Settings on the Terminal


All – probably more – settings for the Dock found in the System in macOS can be adjusted using the command line. This is particularly helpful for automation of course.

IMHO the following selection of commands is more than enough for most settings one needs.


Run killall Dock after any of the commands for the changes to take effect.

Dock’s Position

# Possible options 'bottom', 'left' or 'right'
defaults write orientation bottom

Dock size

# Integer... In my case 32 is the "magic" number
defaults write tilesize -int 32

Dock magnification

# Possible options 'yes' or 'no'
defaults write magnification -boolean yes

Auto hide the Dock

# Possible options 'yes' or 'no'
defaults write autohide -boolean yes

Auto hide delay

# Reasonable values between 0 and 0.9 (ms). – Snaller number = faster appearance
defaults write autohide-time-modifier -float 0
defaults write autohide-delay -float 0

Reset to factory default

# This removes all the settings. macOS recreates them with factory defaults
defaults delete


macOS does not have an elegant option for managing the items in the dock.

However there is a FOSS tool by the name dockutil for that:

dockutil is a command line utility for managing macOS dock items. It is currently written in Swift.