"shutdown" and "halt|poweroff|reboot" Commands

This section provides a quick introduction of the 'shutdown' command, and its alias commands 'halt', 'poweroff', and 'reboot'.

What Is "shutdown" Command? "shutdown" command is a standard Unix/Linux command, that can be used to halt, power-off or reboot a Unix/Linux computer. It has the following syntax:

shutdown [-HPrkc] [TIME] [WALL...]

-H   Halt the computer.
-P   Power-off (shutdown) the computer.
-r   Reboot the computer.
-k   Send a message to all logged-in users only.
-c   Cancel the pending "shutdown" event.

TIME   hh:mm +m, or "now".
WALL   Message text to be sent out

Examples of "shutdown" commands:

sudo shutdown –r now
sudo shutdown –r 0
sudo shutdown –P +60 "System is going down in 60 minutes!"

What Is "halt/poweroff/reboot" Command? "halt/poweroff/reboot" command is an alias command for a specific flavor of the the "shutdown" Unix/Linux command:

halt     = shutdown -H
poweroff = shutdown -P
reboot   = shutdown -r

Table of Contents

 About This Book

 Introduction to Linux Systems

 Cockpit - Web Portal for Administrator

 Process Management

 Files and Directories

 Users and Groups

 File Systems

 Block Devices and Partitions

 LVM (Logical Volume Manager)

 Installing CentOS

 SELinux - Security-Enhanced Linux

 Network Connection on CentOS

 Internet Networking Tools

 SSH Protocol and ssh/scp Commands

 Software Package Manager on CentOS - DNF and YUM

 vsftpd - Very Secure FTP Daemon

 Postfix - Mail Transport Agent (MTA)

 Dovecot - IMAP and POP3 Server

 Email Client Tools - Mail User Agents (MUA)

 LDAP (Lightweight Directory Access Protocol)

Administrative Tasks

 "systemctl status/start/stop/enable/disable" Commands

"shutdown" and "halt|poweroff|reboot" Commands

 Move /home Directory to New Partition

 Move All Users to a New System

 "last/lastb" - Review Login History

 References

 Full Version in PDF/EPUB