MainspringGuides › Dock Terminal Commands
macOS Guide

15 Terminal Commands to Customize the Mac Dock

Updated July 2026 · 3 min read

The Dock's settings pane shows maybe a third of what the Dock can do. The rest lives in its preference domain, com.apple.dock, reachable from Terminal. Here are the 15 commands worth knowing — including several with no Settings equivalent at all — plus the revert for every single one.

Before you start: the pattern

Every tweak below follows the same shape: a defaults write against com.apple.dock, then killall Dock to restart the Dock so the change takes effect. Reverting is uniform too — delete the key and restart:

# universal undo for any command on this page
defaults delete com.apple.dock KEY_NAME
killall Dock

Swap KEY_NAME for the key you changed (tilesize, autohide-delay, and so on). Deleting a key returns that setting to the macOS default. Nothing here requires sudo, and none of it can harm your system — worst case, you reset the Dock and re-pin some icons.

Size, position, and magnification (1–5)

# 1. set icon size in pixels (16–128; slider default ~48)
defaults write com.apple.dock tilesize -int 40

# 2. lock the size so drag-resizing the divider does nothing
defaults write com.apple.dock size-immutable -bool true

# 3. move the Dock: left, bottom, or right
defaults write com.apple.dock orientation -string left

# 4. pin the Dock to a corner: start, middle (default), or end
defaults write com.apple.dock pinning -string start

# 5. magnification on, with hover size in pixels
defaults write com.apple.dock magnification -bool true
defaults write com.apple.dock largesize -int 80

killall Dock

Numbers 1, 3, and 5 mirror System Settings sliders but let you set exact values. Numbers 2 and 4 have no Settings equivalent: size-immutable stops accidental resizes for good, and pinning parks the Dock at the start or end of its edge instead of centered.

Auto-hide and animations (6–10)

# 6. turn auto-hide on (false to turn off)
defaults write com.apple.dock autohide -bool true

# 7. remove the delay before the hidden Dock slides out
defaults write com.apple.dock autohide-delay -float 0

# 8. speed up the slide animation (default ~0.5s)
defaults write com.apple.dock autohide-time-modifier -float 0.4

# 9. change the minimize effect: genie, scale, or suck
defaults write com.apple.dock mineffect -string suck

# 10. stop icons bouncing while an app launches
defaults write com.apple.dock launchanim -bool false

killall Dock

Together, 6–8 are the classic "instant Dock" recipe. Number 9's suck is a hidden third minimize effect Apple never put in the menu. Revert any of them with the delete pattern above — for example defaults delete com.apple.dock autohide-delay.

Behavior and hidden gems (11–15)

# 11. minimize windows into their app's icon
defaults write com.apple.dock minimize-to-application -bool true

# 12. dim the icons of hidden (Cmd+H) apps — see status at a glance
defaults write com.apple.dock showhidden -bool true

# 13. show ONLY running apps; hides all pinned icons
defaults write com.apple.dock static-only -bool true

# 14. scroll up on an icon to show its windows, on a stack to open it
defaults write com.apple.dock scroll-to-open -bool true

# 15. hide the suggested and recent apps section
defaults write com.apple.dock show-recents -bool false

killall Dock

Numbers 12–14 exist nowhere in System Settings and are the reason this list is worth bookmarking. Note that 13 doesn't delete your pinned apps — turn it off (defaults delete com.apple.dock static-only; killall Dock) and they all come back.

The full reset

# WARNING: wipes every Dock customization, pinned apps included
defaults delete com.apple.dock
killall Dock

This restores the factory Dock. There's no undo, so screenshot your Dock first if the layout matters to you.

See also: how to open Terminal already inside a folder.

All 15, as toggles

Every tweak on this page is a labelled, reversible toggle in Mainspring — plus 75 more across Finder, keyboard, and privacy. Flip, compare, flip back. No Terminal, no remembering key names.

Try Mainspring free →

Signed & notarized by Apple · 1-day free trial · $29 once

Want to understand what you just ran?

The defaults system behind these commands drives hundreds of hidden macOS settings, not just the Dock. Learn how domains, keys, and types work in our guide to defaults write.