title: Is there a way to kill all applications and restart the Mac from the terminal?
body: <p>Is there a code to run in the terminal that I can use to close all applications and restart the mac? I am currently using "osascript -e 'tell app \"System Events\" to restart" to cause a restart, but it isn't closing the applications. - I need for the code to all be in one command, so I can put it in my code without one canceling out the other.</p>