What is a Shutdown in Linux?

The shutdown command in Linux is used to shut down the system safely. You can shut down the machine immediately, or schedule a shutdown using 24 hour format. It brings the system down in a secure way. When the shutdown is initiated, all logged-in users and processes are notified that the system is going down, and no further logins are allowed. Only root user can execute shutdown command.

Syntax of shutdown Command

  • The syntax of shutdown command:
shutdown [OPTIONS] [TIME] [MESSAGE]
  • options – Shutdown options such as halt, power-off (the default option) or reboot the system.
  • time – The time argument specifies when to perform the shutdown process.
  • message – The message argument specifies a message which will be broadcast to all users.
  • Options of Shutdown

    The following are the options of shutdown command in Linux:

    -r : Requests that the system be rebooted after it has been brought down.
    -h : Requests that the system be either halted or powered off after it has been brought down, with the choice as to which left up to the system.
    -H : Requests that the system be halted after it has been brought down.
    -P : Requests that the system be powered off after it has been brought down.
    -c : Cancels a running shutdown. TIME is not specified with this option, the first argument is MESSAGE.
    -k : Only send out the warning messages and disable logins, do not actually bring the system down.

    shutdown command in Linux with Examples

    The `shutdown` operation in Linux is a crucial command for managing system power states, allowing administrators to halt safely, power off, or reboot the system. This command provides flexibility in scheduling downtimes, ensuring minimal disruption to users and processes. In this article, we will explore the `shutdown` command with practical examples, illustrating how to use its various options to control system behavior effectively.

    Table of Content

    • What is a Shutdown in Linux?
    • How to use shutdown?
    • How to shutdown the system at a specified time?
    • Linux Shutdown – FAQs

    Similar Reads

    What is a Shutdown in Linux?

    The shutdown command in Linux is used to shut down the system safely. You can shut down the machine immediately, or schedule a shutdown using 24 hour format. It brings the system down in a secure way. When the shutdown is initiated, all logged-in users and processes are notified that the system is going down, and no further logins are allowed. Only root user can execute shutdown command....

    How to use shutdown?

    The shutdown command in Linux is used to halt, power off, or reboot the system. It can be scheduled or executed immediately, providing flexibility in managing system downtime....

    How to shutdown the system at a specified time?

    The time argument can have two different formats. It can be an absolute time in the format hh:mm and relative time in the format +m where m is the number of minutes from now....

    Linux Shutdown – FAQs

    What is the shutdown command for Linux?...