Every Monday, we’ll show you how to do something new and simple with Apple’s built-in command line application. You don’t need any fancy software or a knowledge of coding to do any of these. All you need is a keyboard to type ’em out!
The Dock has been a staple of OS X, making access to frequently used and opened applications easier than ever. The dock doesn’t have many customizations out of the box in OS X, though. Fortunately, with a bit of Terminal hackage, we can change the position of the Dock so that it doesn’t always appear in the center of the screen when positioned to the sides or bottom of the screen. Using this trick, we can pin the Dock to the left, center, or right. Continue reading and we’ll show you how it’s done.
The OS X Terminal application lives in /Applications/Utilities. Open this application, and type in the following command to change the position of the Dock to pin it to the left of the screen:
defaults write com.apple.dock pinning -string start
If you wish to pin the Dock to the right, then replace “start” with “end” in the command above. Remember to type the command exactly as shown above or this trick won’t work properly.
After you’ve typed the command above, then press the enter key to submit the command. Next, you can log out of your OS X account and back in, or you can restart the Dock by typing the following command to see the change take effect immediately:
killall Dock
Again, press Enter to accept the command. You’ll notice the Dock will disappear, and then reappear with the changes.
If you no longer wish to have this tweak, and want to go back to a perfectly centered Dock as Apple originally ordained, then type the following command to center the Dock:
defaults write com.apple.dock pinning -string middle
Then, restart the Dock by typing the following command (or by logging out and back in):
killall Dock
After you press return, then your Dock will reappear, perfectly centered on the screen and back to normal.
Cory Bohon is a freelance technology writer, indie Mac and iOS developer, and amateur photographer. Follow this article’s author on Twitter.