Pinning the Mac OS X Dock
… or "How the Dock Should Behave"
By default, the OS X Dock is located in the middle of either the bottom or the sides of the screen. It can, however, be pinned to one of the “corners.” For example, in the screenshot above, the dock is located on the right but pinned to the bottom.
The dock works fine when pinned to either the top / bottom / left / right and it only takes two lines at the Terminal to achieve.
Run the Terminal Application
Go to the Spotlight icon in the top right of the screen and search for “terminal”. You can then click on the “Terminal” application to run it.
By default, the dock is pinned to the “middle” of either the bottom or the side (wherever you choose to have your Dock), but you can also pin it to the “start” or the “end.” If your dock is on the bottom of the screen, the start is at left, the end is at the right. If your dock is on the side of the screen, the start is at the top, the end is at the bottom (in the first screenshot in this article, the dock is on the right of the screen and pinned to the “end.”)
Change The Setting
To pin the dock to the start (if on sides then top, if on bottom then left), use:
defaults write com.apple.dock pinning -string start
To pin the dock to the end (if on sides then bottom, if on bottom then right), use:
defaults write com.apple.dock pinning -string end
To return the dock to the middle (standard), use:
defaults write com.apple.dock pinning -string middle
“Restart” the Dock
Once the setting has been changed, you need to run:
This command restarts the program that displays the Dock on the screen. It can take a few seconds to refresh, but once it’s up again, it should now be pinned to the corner!
To close the Terminal application once you’re done, type exit and press Enter, or press Cmd+Q.