Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.