When the GUI fails...
At a recent HMUG meeting the club's PowerBook failed to shut down from the Mac OS X graphical user interface (see also Apple Knowledge Base article). After several attempts resulting in a machine hung in a blue screen, partially shut down, we decided to shut down from the UNIX command line.
Enter the Terminal
In order to shut down we went and opened the Terminal.app on a second computer. The Terminal is located in the /Applications/Utilities folder. We then logged in via ssh (see the setup proceedure in the Remote System Update HowTo if you have not set this up yet).
At the prompt type the following command:
sudo /sbin/shutdown -h now
You will be prompted for your password. This will only work if you have administrative permissions.
Restart
You can also restart using the following command:
sudo /sbin/shutdown -r now
As you might have guessed -h means system halt and -r means reboot. The now parameter is one possible way of setting the shutdown time. See the man page for other options.
Version 1.2.0 - 20070304