Ubuntu – use the power button to shut down the computer gracefully on Ubuntu Minimal

12.10acpishutdownubuntu-minimal

I am looking for a way to get my computer to automatically shutdown when I press the power button. I have installed Ubuntu 12.10 minimal. A similar question is asked here. However, with Ubuntu Minimal, I do not have the /etc/acpi/ directory, most likely because ACPI does not come installed by default?

Is there a way to shutdown the computer nicely via the power button without the use of ACPI? Or do I have no choice but to install it?

Best Answer

ACPI is the actual system responsible for handling such power related tasks. Without ACPI support (either software or hardware), you won't be able to listen to the power button event.

For Ubuntu installing the acpid Install acpid package should be sufficient. This provides the event daemon listening for events such as pressing a power button. It is installed on regular Ubuntu versions, but as you've installed a minimal version, it was omitted.

On a minimal/server installation, the installation can be performed on the command line like any other package:

sudo apt-get install acpid