Shutdown Ubuntu with ctrl-alt-delete

Power cuts are becoming a way of life for many people and here in Blarney we get our fair share of them unfortunately. The second in as many weeks happened this morning and before I could rig up a network cable between my laptop and desktop the UPS powered down and my big noisy desktop died with it. Thankfully without filesystem corruption.

Normally when you press the magic combo of ctrl-alt-delete the machine reboots but in this case it would be much better if the machine did a shutdown. In previous versions of Linux I had to edit /etc/inittab to get the desired effect but that file doesn’t exist in Ubuntu Edgy. Instead you must look at /etc/event.d/control-alt-delete. That file is fairly self explanatory which is all well and good because there’s very little information if you don’t know what to look for.

According to a post here, “Ubuntu replaced init with upstart event daemon”. It’s simple to change it to shutodown. Replace “-r” with “-h” in the following line:
exec /sbin/shutdown/ -r now "Control-Alt-Delete pressed"
No need to run inittab, just hit the magic combo to halt the computer!

PS. thanks so much for all the comments yesterday and the day before. I was bowled over by the response to both posts, especially the Daffodil Day one which struck a chord with many people

5 thoughts on “Shutdown Ubuntu with ctrl-alt-delete

  1. Donncha. I love the daf but can you not bring the robin back in there somehow? It’s almost as if you had more important things to think about than fans of your previous header!

  2. Pingback: ..
  3. Ah! The three finger salute. It was a laughable way of shutting down your Linux box in the last 5 years or so but is becoming more and more of a mainstream thing with Linux fans using Ubuntu, Knoppix etc.

    I missed my Linux OS. Had uninstalled it when my pc crashed. Never did re-install it anymore since then.

Leave a Reply

%d bloggers like this:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close