5

Some are fairly obvious. Specifically, I am referring to:

  -h                          halt or power off after shutdown
  -H                          halt after shutdown (implies -h)
  -P                          power off after shutdown (implies -h)

Isn't halting or powering off kind of expected when you're shutting down? Aren't these redundant?

  -c                          cancel a running shutdown

How on earth would you use this? In my experience, once a shutdown has begun, you don't get much opportunity to enter more commands until the machine is off.

  -k                          only send warnings, don't shutdown

Why does shutdown have an option that makes it not shut down?

What's the deal here? Does "shutdown" mean more than simply turning the machine off?

1 Answer 1

6

You have asked a bunch of questions, let me address them one by one.

Halting is when you bring the machine to a minimal power state without fully powering off the machine. Powering off the machine is what happens when you choose Shut Down from the menu and well, the machine is completely turned off.

Cancelling a running shutdown is for when a shutdown command is issued for the machine to be shutdown after a certain period of time. For example, sudo shutdown -P +6 issues the command to shutdown after 6 minutes. The -c parameter can be used to cancel the shutdown command issued earlier. To shutdown a computer instantly you issue sudo shutdown -P now

Only send warnings and don't shutdown: You must remember that Linux is a multi-user operating system where many users may be logged in to the system at a given point of time. When this command is issued, it sends a message to all the users logged in that there will be a shutdown and an additional message if the system administrator adds that as well. This gives those users time to wrap up their work so that they can be prepared for the shutdown. Think of it as a warning shot to warn the users logged in to wrap up their work although the system won't undergo a shutdown procedure.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .