Terminal command "shutdown -h now" to shutdown or "shutdown -r now" for a restart. No GUI confirmations so unsaved work will be lost. But to OS X, it is a proper shutdown, just like any other Unix OS.