Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The power button on my headless 11.10 server appears to do nothing unless I hold it in for 5 seconds or so, in which case it switches the machine off instantly.

What I'd like it to do if I press it briefly is a normal shutdown (shutdown -P now). How can I allow this?

I have seen this question but it is for desktop installations.

share|improve this question
up vote 1 down vote accepted

I believe you might need acpi-support. Check out the links below for more info on how to manipulate the power button press event.

share|improve this answer
I don't have an /etc/acpi/ directory, even after running sudo apt-get install acpi. Or am I supposed to just create it myself? – Kent Boogaart Oct 27 '11 at 18:28
That's because you need the 'acpi-support' package, as said above. Don't think any of the acpi related ones are included in the server edition. – mikewhatever Oct 27 '11 at 18:34
Perfect - thanks. Sorry, I misread your post initially. – Kent Boogaart Oct 27 '11 at 19:33
Glad I could help. :) – mikewhatever Oct 27 '11 at 19:45
@mikewhatever I presume you've implemented this power off feature. Does the server ask for user passwords or any such question or does it jsut shutdown directly? – itsols Feb 1 '13 at 12:31

You just need to install acpid package (sudo apt-get install acpid), its just one package, nothing more and it will handle all powerbutton events (acpi-support contains more additional packages). Tested on ubuntu server 11.10

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.