Restart System:

$ reboot

Shutdown System:

$ poweroff

Generally, Linux system users use the command line for managing remote Linux systems. This article will help you to shutdown or reboot Linux system using the command line.

Restart Linux

In Linux system just type reboot on command prompt and press enter. Make sure you have enough privileges to restart that server.

init 6      ### Using init command 

Shutdown Linux

You can simply use poweroff command to shutdown Linux system. Use sudo for non-root users to provide privileged access.

init 0      ### Using init command 

Schedule to Reboot Linux Instance

Linux shutdown command provides additional features for reboot or shutdown a Linux system. For example, we can define date/time when the server will be rebooted. We can also define some message which will be displayed before reboot to alert users.

shutdown -r time-of-shutdown "message to display"

Reboot server immediately without any message.

shutdown -r now 

Reboot server just after 10 minutes without displaying any message.

shutdown -r 10 

Reboot server at 02:10 AM with displaying proper message to user.

shutdown -r 02:10 "System is going to reboot..."