TrumanWong

shutdown

Command used to execute system shutdown

Supplementary instructions

shutdown command is used to shut down the system. The shutdown command can shut down all programs and restart or shut down according to the user's needs.

grammar

shutdown(option)(parameter)

Options

-c: When executing the "shutdown -h 11:50" command, just press the + key to interrupt the shutdown command;
-f: Do not execute fsck when restarting;
-F: Execute fsck when restarting;
-h: Shut down the system;
-k: Just send information to all users, but will not actually shut down the machine;
-n: Do not call the init program to shut down, but shutdown itself;
-r: Restart after shutdown;
-t<number of seconds>: How many seconds to delay between sending a warning message and deleting the message.

Parameters

  • [Time]: Set the time after which the shutdown command will be executed;
  • [Warning message]: A message to be sent to all logged in users.

Example

Specify to shut down immediately now:

shutdown -h now

Specify 5 minutes to shut down the computer and send a warning message to the logged-in user:

shutdown +5 "System will shutdown after 5 minutes"