Temporarily prevent Linux from shutting down

Accidental shutdown or reboot is a serious blunder, especially if the kernel is being updated in the background.

In order to prevent Linux from shutting down while your update script is running, I recommend you to use systemd-inhibit:

systemd-inhibit will block the shutdown or reboot until the update script is finished.

Additional options:

  • –who=”your name”
    A human-readable name
  • list
    List all active inhibition locks

Leave a Reply

Your email address will not be published. Required fields are marked *