Shutting Down the System
Use the shutdown command to shut down your system. The shutdown command has a number of different command-line options (such as shutting down at a predetermined time), but the fastest way to cleanly shut down Linux is to use the -h or halt option, followed by the word now or the numeral zero (0), like this:
matthew@seymour:~$ sudo shutdown -h now
or
matthew@seymour:~$ sudo shutdown -h 0
To incorporate a timed shutdown and a pertinent message to all active users, use shutdown’s time and message options, as follows:
matthew@seymour:~$ sudo shutdown -h 18:30 "System is going down for maintenance thisevening at 6:30 p.m. Please make sure you have saved your work and logged out bythen or you may lose data."
This example shuts ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access