How to Reboot Your Linux PC or Server With a Single Command – Guide

Rebooting your Linux system is a common task that you will need to do at some point. If you need to fix a problem or want to reboot after installing updates, you can do this from the command line just like with everything else in Linux. ..

With the reset command

reboot ..

Your computer will restart.

Using the shutdown command

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.

sudo reboot This will restart the system at midnight.

Shutdown the computer at 00:00.

Press “Ctrl + Alt + R” to restart in 5 minutes. ..

Shutdown the computer by pressing the power button and then pressing and holding the “r” key for five seconds. ..

The second argument is a warning message that prints 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.

System will restart in 10 minutes! ..

Cancel a reset

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 if you have a copy of the SSH key that is associated with the account. ..

A data center typically offers 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

You can shutdown your Linux computer by using 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

This guide will show you how to reboot your Linux PC or server with a single command. ..