System and processes
The shutdown command
Shuts down or restarts the machine in an orderly way, warning users and closing programs.
Syntax
sudo shutdown [-h|-r] now | shutdown -cMost useful options
-hPower off-rRestart-cCancel a scheduled shutdown+NSchedule in N minutesCopy-ready examples
$ sudo shutdown -h nowPower off now$ sudo shutdown -r nowRestart nowYou can try them in the browser terminal: it does not touch your computer.
Typical mistakes
- It requires administrator rights.
- On a remote server, powering off without warning can cut your own connection.
FAQ
How do I cancel a shutdown?
With shutdown -c before the time arrives.
Learn to actually use it
The basic Linux course takes you from zero to console fluency with 24 self-grading lessons.
Start the free course