keepcalculator

06 Numbers and Powers

Hidden Commands to Customize Mac Dock

Card No. 06·85066 · Updated · Standard formula, shown below

You can customize the Mac Dock beyond System Settings using a set of hidden terminal commands, known as “defaults write” commands, that let you control its size, position, animation, and behavior. These commands are entered in the Terminal app and take effect after you restart the Dock. They unlock options that the standard settings pane doesn’t expose, such as making the Dock instantly appear, removing the animation lag, or changing the magnification effect.

What Are Hidden Dock Commands?

The Mac Dock is controlled by a preferences file that stores every setting you see in System Settings (or System Preferences on older macOS versions). The defaults command in Terminal gives you direct access to that file, letting you read and write keys that the graphical interface doesn’t show. Each key is a specific option, and you set it with a value—usually a boolean (true/false), a number, or a string. After changing a key, you must restart the Dock with the killall Dock command for the change to take effect.

These commands have existed for years and work across most macOS versions, though Apple occasionally renames or deprecates keys. The most reliable way to see all available keys is to run defaults read com.apple.dock in Terminal, which prints the current settings. You’ll notice keys like autohide, magnification, and tilesize—these are the same ones the settings app writes. Hidden keys are simply ones that aren’t exposed in the GUI.

How to Run These Commands

To use any hidden command, open the Terminal app (found in Utilities within Applications), type or paste the command, and press Return. You’ll likely need to enter your administrator password if you’re not an admin user. After running the command, restart the Dock by typing killall Dock and pressing Return. The Dock will disappear and reappear instantly with your new settings.

Here are the most useful hidden commands:

  • Disable the animation when hiding/showing the Dock: defaults write com.apple.dock autohide-time-modifier -int 0 — this removes the delay that makes the Dock slide in slowly.
  • Make the Dock appear instantly when you hover over the edge: defaults write com.apple.dock autohide-delay -float 0 — removes the wait time before the Dock appears.
  • Change the magnification effect to a genie or scale: defaults write com.apple.dock mineffect -string "genie" — options are “genie”, “scale”, or “suck” (suck is deprecated but still works in some versions).
  • Enable a 2D Dock (flat look, no 3D reflection): defaults write com.apple.dock no-glass -boolean YES — this is only effective on older macOS versions (pre-Mojave); newer versions have a flat design by default.
  • Add a spacer to the Dock: defaults write com.apple.dock persistent-apps -array-add '{tile-data={}; tile-type="spacer-tile";}' — inserts a blank space to group icons.
  • Change the Dock’s position to the left, bottom, or right: defaults write com.apple.dock orientation -string "left" — use “left”, “bottom”, or “right”.

Each command is independent, so you can combine them. For example, to make the Dock instantly appear and have no animation, run both the autohide-delay and autohide-time-modifier commands.

Why Use Hidden Commands Instead of Settings?

The standard System Settings Dock pane offers only a handful of options: size, magnification, position, minimize effect, and auto-hide. Hidden commands give you finer control over the same features—like setting the auto-hide delay to a specific fraction of a second—or enable features that aren’t in the GUI at all, such as adding spacers. If you’re a power user who wants a specific feel, these commands are the only way to achieve it.

One common misconception is that hidden commands can brick your Mac or cause permanent damage. They don’t—they only change preference values, which you can revert by setting them back to the default or by deleting the Dock’s preferences file (which resets everything to factory settings). The worst that can happen is a visual glitch that goes away after a restart.

Common Problems and Fixes

If a command doesn’t seem to work, check the following:

  • Did you restart the Dock? After any defaults write command, you must run killall Dock. Without it, the Dock won’t reload its preferences.
  • Did you type the key correctly? Keys are case-sensitive. For example, autohide-time-modifier must be lowercase, with hyphens.
  • Is the key deprecated? Some keys, like no-glass, only work on older macOS versions. On modern macOS, the Dock is always flat, so the command does nothing.
  • Did you use the correct value type? Some keys expect a float (like -float 0), others an integer (-int 0), and others a string (-string "genie"). Using the wrong type may cause the command to be ignored.

If you want to revert a single change, set the key back to its default. For example, to restore the default auto-hide delay, run defaults write com.apple.dock autohide-delay -float 0.5 (the default is 0.5 seconds). To reset the entire Dock, run defaults delete com.apple.dock and then killall Dock—this will erase all your customizations, including spacers and icon order, so use it as a last resort.

Comparison with Third-Party Apps

Apps like TinkerTool or Onyx offer a graphical interface for many of these hidden settings, but they essentially run the same defaults commands in the background. Using Terminal directly is free, requires no extra software, and works the same way. The downside is that you need to remember the exact commands, whereas a third-party app provides checkboxes and sliders. If you’re comfortable with the command line, there’s no need for a third-party tool; if you prefer a GUI, those apps are a safe alternative—they don’t modify system files beyond what you’d do manually.

Cost and Safety

All hidden Dock commands are free and built into macOS. They don’t require any additional downloads or purchases. They are safe as long as you only modify the com.apple.dock domain. Avoid changing other system domains unless you know what you’re doing, as that could affect system stability. Always back up your Dock preferences before experimenting: copy ~/Library/Preferences/com.apple.dock.plist to a safe location. If something goes wrong, you can restore that file and restart the Dock.

Alternatives to Hidden Commands

If you’re not comfortable with Terminal, you can achieve some customizations through the Settings app, though limited. For example, you can change the Dock’s size, magnification, position, and minimize effect. To add spacers, you can drag a blank space from the Applications folder? Actually, spacers can be added by dragging the divider line between apps and documents while holding Command—this creates a spacer that you can drag around. That’s a built-in GUI trick that doesn’t require any commands. For more advanced tweaks, you can use a third-party app, but the hidden commands remain the most direct and flexible method.

Frequently Asked Questions

How do I reset the Dock to its default settings?

Run defaults delete com.apple.dock in Terminal, then killall Dock. This will restore all Dock preferences to their factory defaults, including icon order, size, and animations. Your apps won’t be removed, but the Dock will look like it did on a new Mac.

Why does the Dock not hide automatically after I enable auto-hide?

Auto-hide is controlled by the autohide key. Make sure you set it to true: defaults write com.apple.dock autohide -boolean true and then restart the Dock. If it still doesn’t hide, your Dock may be set to “Always show” in System Settings—check that the toggle is off.

Can I make the Dock transparent or change its color?

There is no hidden command to change the Dock’s background color or transparency—that’s controlled by the system’s wallpaper and the “Reduce transparency” accessibility setting. You can enable or disable transparency with defaults write com.apple.universalaccess reduceTransparency -boolean true (or false), but that affects the entire system, not just the Dock.

Will these commands work on the latest macOS?

Most core keys like autohide-delay, autohide-time-modifier, and mineffect still work on macOS Sonoma and Sequoia. Some older keys (like no-glass) are deprecated and have no effect. Apple may remove or rename keys in future versions, so always test with defaults read com.apple.dock to see what’s available.

Do I need to be an administrator to run these commands?

Yes, you need admin privileges because the preferences file is system-wide. If you’re a standard user, you’ll be prompted for an administrator password when running defaults write commands. You can also run them from a terminal with sudo, but that’s not necessary if you’re in the admin group.

Related

Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.

More cards in this drawer

The whole Numbers and Powers drawer →