How do I change the position of the Dock? I want to keep the Dock on the left/right/top side instead of the bottom side of my screen.

Is there a setting in System Preferences or a Terminal command that allows me to change this?
You can change the position of the Dock by following these steps.


Locate your Dock. It is usually on the bottom prior to changing the position. You might have to hold it there for a second so it unhides. 
Locate the separator between your apps and the trash can and other folders. In older versions of macOS, this is a dotted line. In the example screenshot, this is between Google Chrome and the Downloads folder. 
Right-click that seperator to open a context menu. 
Open the submenu named Position on Screen. 
Pick your new Dock position. The default is Bottom, but you can change it to Left or Right. 
The Dock will now appear on that side of the screen.