How do I programatically trigger a system shutdown or reboot in Linux? Preferably without requiring elevated privileges.
On older releases (e.g. Ubuntu 10.04) I could ca
The shutdown command. However, that requires root privileges on most systems.
Shutdown now:
shutdown -h now
Restart now:
shutdown -r now
man shutdown for more info.
man shutdown