Disable the Power Off Button

If you have a computer that needs to run 24/7, you probably don’t want the power button to be accidentally pushed and the system to shut down. Here’s how to disable the power off button in Linux (Proxmox 7.4/Debian 11.6).

Edit the /etc/systemd/logind.conf file and set HandlePowerKey to ignore.

The power button can still be used to power the system on, and if pressed for several seconds can force power off the system.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.