Monday, May 6, 2024
150
rated 0 times [  150] [ 0]  / answers: 1 / hits: 444176  / 3 Years ago, sun, september 26, 2021, 1:22:08

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.


More From » command-line

 Answers
5

Try using the following command to safely reboot:



sudo reboot


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



sudo shutdown -h now

[#27760] Sunday, September 26, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
suitman

Total Points: 487
Total Questions: 105
Total Answers: 98

Location: India
Member since Wed, Aug 4, 2021
3 Years ago
;