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

How do I reboot a Ubuntu Server from the command line? sudo reboot now never seems to work for me. Because its a server, I don't have a window manager installed, so I can't do it from a GUI (which always seems to work).

enter image description here

I've had the problem for years on different versions of the operating system. It happens in virtual machines and on real metal. The same problem exists with sudo shutdown now, too.

I've lived with it in the past. The difference now is I don't want to just hit the power button because I might lose data.

share|improve this question
Have you tried sudo shutdown -r now ? – ASCIIbetical Dec 30 '13 at 4:25
sudo reboot now is not a valid option. see man 8 reboot – souravc Dec 30 '13 at 4:31
Thanks souravc - that's interesting. The command never complains about an invalid option. I'll test some of these when I get out of mysql. – user207039 Dec 30 '13 at 4:45
sudo init 6 must always work. Also, there are Ctrl+Alt+Del and REISUB. – Danatela Dec 30 '13 at 5:46
up vote 43 down vote accepted

Try using the following command to reboot:

sudo reboot

If, instead, you want to shut down the server safely, use this command:

sudo shutdown -h now
share|improve this answer
I have read the question. They tried sudo reboot now which is incorrect usage. I am wondering why my answer was downvoted. – Jay Dec 30 '13 at 7:35

For reboot, type the following

sudo shutdown -r now
share|improve this answer
Perfect, that works too. – user207039 Dec 30 '13 at 8:02

As an alternative to sudo shutdown -r now, this command also effects an immediate shut-down:

sudo shutdown -h +0

Add the -r command to reboot:

sudo shutdown -r -h +0

Output (running as root):

root@mydevwkstn:~# shutdown -r -h +0

Broadcast message from cjbs@mydevwkstn
        (/dev/pts/10) at 14:41 ...

The system is going down for halt NOW!
share|improve this answer

The command to immediately reboot the system is

sudo reboot now

But if you want to force reboot it:

sudo reboot -f now
share|improve this answer
now is not a valid option after reboot. See man 8 reboot – souravc Dec 30 '13 at 4:46

Your Answer


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