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

I would like to turn off my server by pressing the power button. The problem is if I am in the login screen (I haven't logged in yet). Pressing the power button will not shutdown my server. How can I solve this problem ?

share|improve this question
DO NOT DO WHAT @Sam IS SUGGESTING HERE. You will very likely corrupt your filesystem and lose data irrecoverably if you make a habit of this. – Jim Salter Nov 26 '12 at 1:34
up vote 2 down vote accepted

sudo apt-get update ; sudo apt-get install acpid

That should be all you need to do; after that, the server will catch the ACPI event caused by a short power button press and respond by shutting down cleanly.

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.