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 have some KVM virtual machines running Ubuntu 11.10. Using the GUI of the Virtual Machines I can turn them off as you would normally do it on Ubuntu.

However, I prefer to work on the VMs using SSH from the host (which also runs Ubuntu 11.10), and when trying to shutdown a VM with shutdown 0 it simply does not work. Any suggestions?

share|improve this question
up vote 3 down vote accepted

To shut down an Ubuntu machine from the command-line (via SSH or otherwise), run:

sudo shutdown -P now
  • The -P option tells shutdown to power off the virtual machine at the end; contrary to its name, shutdown will not do this by default, instead bringing the machine into single-user/maintenance mode.

  • See man shutdown (and man sudo) for more details.

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.