MainspringGuides › Pin Dock to corner
macOS Guide

Pin the Mac Dock to a Corner With a Hidden Terminal Setting

Updated July 2026 · 3 min read

The Dock always centers itself along its screen edge, and System Settings offers no way to change that. But the Dock has shipped with a hidden pinning preference for years — one Terminal command anchors it to either end of the edge, so it hugs a corner instead of floating in the middle. It works the same on Ventura, Sonoma, and Sequoia.

Pin the Dock with one command

Open Terminal (it's in Applications → Utilities) and run one of these:

# pin the Dock to the start of its edge
defaults write com.apple.dock pinning -string start
killall Dock

# or pin it to the end of its edge
defaults write com.apple.dock pinning -string end
killall Dock

killall Dock simply restarts the Dock process so the new setting loads. It takes about a second and doesn't touch your open windows or apps.

What “start” and “end” mean

The labels are relative to the edge the Dock sits on:

The Dock keeps all its normal behavior: it still grows and shrinks as apps open, but it now grows away from the pinned corner instead of expanding from the center in both directions. Auto-hide, magnification, folder stacks, and the size slider all keep working — only the anchor point changes.

Put it back to normal

# return the Dock to its default centered position
defaults delete com.apple.dock pinning
killall Dock

Because the setting lives outside System Settings, nothing in the UI will ever reset it for you — but it also can't be flipped by accident. It survives restarts and macOS updates until you delete it.

Check what's currently set

# see the current pinning value
defaults read com.apple.dock pinning

If Terminal replies start or end, the tweak is active. If it prints an error saying the pair “does not exist,” the Dock is centered — macOS only creates the key once you write it, so a missing key just means the default. This is handy when you're auditing a hand-me-down Mac, or writing a dotfiles script and want to check before you set.

Why pin the Dock at all?

A centered Dock is a moving target: every app you open shifts every icon sideways. Pin it and the anchored end never moves — Finder is always in exactly the same spot, so muscle memory actually works. Corners are also the easiest place on screen to hit with a mouse; you can flick the pointer into the corner without slowing down to aim. On ultrawide monitors, pinning keeps the Dock near your keyboard tray instead of stranded in the middle of five feet of glass.

Pinning is also per-user: your account can keep a corner Dock while everyone else on the same Mac sees the standard centered one. And it's a quiet favorite for screen recording and live demos — with the Dock anchored, every app sits in the same pixel position in every take, which makes cursor choreography and editing noticeably easier.

Skip the Terminal

Dock pinning is exactly the kind of hidden setting Mainspring surfaces: a labelled toggle you can flip on, preview, and revert in one click — alongside 90+ other macOS tweaks.

Try Mainspring free →

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

Pair it with a side Dock

Pinning shines with a vertical Dock: pinned to the top of the left edge, it behaves like a fixed app rail. See how to move the Dock to the side of the screen to set that up. A pinned side Dock also plays nicely with auto-hide, sliding in and out of its corner without ever disturbing the windows you're working in.