How to Reboot Your Linux PC or Server With a Single Command – Guide
Sooner or later you will have to reboot your Linux system. If you need to fix a problem or want to reboot your system after installing updates, you can do this from the command line, just like with everything else in Linux.
With the reset command
The easiest way to reboot your Linux system is with the reboot command. To reboot the system immediately, just type: sudo reboot Your system will restart.
Using the shutdown command
The reboot command is a front end to the shutdown command. Both commands have the same arguments. If you just want to reboot your machine using shutdown, use the -r flag: sudo shutdown -r The shutdown command takes other arguments, so you can customize how you want to reboot. By default, you will need time sequences that allow you to restart at some point in the future. The syntax for a time stream is “hh:mm”, where “hh” is the hour and “mm” is the minute of the hour you want to reset in 24-hour clock format. For example, if you want to restart the system at midnight, you would issue this command: sudo shutdown -r 00:00 There is also a shortcut to specify the minutes, “+n”, where “n” represents the minutes. For example, to restart in five minutes: sudo shutdown -r +5 The second argument is a “wall message”, which prints a message to each terminal connected to the system. On a shared system such as a server, it’s a good idea to give other active users an up so they can save their work. sudo shutdown -r +10 “System restart in 10 minutes!” If you’ve changed your mind and want to cancel a scheduled reset, enter: sudo shutdown -c The reboot and shutdown commands work on local and remote systems. If you are connected to a server over SSH, when you reboot you will be disconnected unless you are connected to a serial console. If something goes wrong with the system and you are logged in via SSH, you may only be able to log in again directly to a terminal connected to the system. Most data centers offer serial console servers that connect to rack-mounted servers or provide “out-of-band” management that lets you access the system outside of SSH, typically through a web interface. Those features allow you to manage the system even during reboot.
Now you can reboot your Linux system
It’s easy to reboot your system from the command line, now or in the future, with the reboot and shutdown commands, even remotely. If you want to shut down your Linux computer, you can also do that from the command line. Please share this article if you like it!
Final note
I hope you like the guide How to Reboot Your Linux PC or Server With a Single Command. In case if you have any query regards this article you may ask us. Also, please share your love by sharing this article with your friends.