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.

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
1  
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
2  
sudo init 6 must always work. Also, there are Ctrl+Alt+Del and REISUB. –  Danatela Dec 30 '13 at 5:46

3 Answers 3

up vote 6 down vote accepted

Please try

sudo reboot

for a reboot and

sudo shutdown -h now

to shutdown safely, and let us know if there is a problem.

share|improve this answer
1  
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

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
3  
now is not a valid option after reboot. See man 8 reboot –  souravc Dec 30 '13 at 4:46

Your Answer

 
discard

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