We know why it is moving: Why does my dock keep moving back to my other monitor?
Now, how can we stop it? Some terminal command or even paid software?
Ask Different is a question and answer site for power users of Apple hardware and software. It only takes a minute to sign up.
Sign up to join this communityWe know why it is moving: Why does my dock keep moving back to my other monitor?
Now, how can we stop it? Some terminal command or even paid software?
You cannot "just" stop it, unfortunately.
You have some options to keep it in the same place, but they have drawbacks:
A) Keep the dock on the left or right side of the desktop. That way it will stay in place.
or
B) In Preferences => Mission Control, uncheck "Displays have separate Spaces". Now the dock will stay in place, but monitors will switch spaces together rather than independently.
Although you can't stop it happening, you can reset its position by restarting the Dock process:
sudo killall Dock
Worked for me like @Allan or @Scott Reed suggested.
My solution is to create a new shortcut with ICanHazShortcut with the terminal command "killall Dock". When you press the shortcut key you designate, it will move the dock back to the primary monitor.