On MacOS the command line is typically accessed via Terminal.app, equivalent to cmd.exe on Microsoft Windows. The Terminal app passesthe text commands to the operating system for processing, then displays the returned results or errors.
In MacOS here are two ways to kill processes in one hit. I'll use Google Drive as an example.
List process IDs (optional, useful to query beforehand or verify afterwards):
ps aux | grep "Google Drive" | awk '{print $2}'
Kill:
ps aux | grep "Google Drive" | awk '{print $2}' | xargs kill -9
-or-
sudo killall -9 "Google Drive"
The above two perform the same task.
The Dock is the window manager of MacOS as well as a place to access application features.
I had an issue where switching back to an application would show a different frontmost window to when I left it. Resetting Dock preferences fixed this. killall Dock
quits and re-launches the Dock app to force a re-load of the new preferences.
rm ~/Library/Preferences/com.apple.dock.plist && killall Dock