To shut down a computer at a specific time, use the shutdown
command. For more information, see the shutdown
man page.
Enter the following command in a Terminal window:
$ ssh -l root computer shutdown -h now
Replace computer with the IP address or host name of the remote computer.
Enter the following command in a Terminal window:
$ sudo shutdown -h + mm
Replace mm with the number of minutes until the remote computer shuts down.
To support UPS restart after power failure, the shutdown
command provides theĀ -u
option. This option halts system shutdown before the shutdown
command instructs the power manager to turn off the power supply.
The -u
option keeps the system halted and waits for 5 minutes before removing power so an external UPS can forcibly remove power.
Using the -u
option simulates a dirty shutdown, which allows a later automatic power-on. The operating system uses the -u
option with supported UPS devices in emergency shutdowns.