How to shutdown / reboot the remote Linux server from the CLI

How to shutdown / reboot the remote Linux server from the CLI

To shutdown or reboot a remote Linux server from the command line interface (CLI), you can use the shutdown command. This command can be used to schedule a shutdown or reboot of the server at a specific time, or to shutdown or reboot the server immediately.

Here are a few examples of how to use the shutdown command to shutdown or reboot a remote Linux server:

  1. To shutdown the server immediately, use the following command:
refe‮al:ot r‬utturi.com
shutdown -h now
  1. To reboot the server immediately, use the following command:
shutdown -r now
  1. To schedule a shutdown or reboot at a specific time, use the -t option to specify the number of seconds until the shutdown or reboot should occur. For example, to schedule a shutdown in 30 minutes (1800 seconds), use the following command:
shutdown -h 1800
  1. To schedule a reboot in 30 minutes (1800 seconds), use the following command:
shutdown -r 1800

Note that you will need to have the necessary permissions to run the shutdown command on the remote server. Consult the documentation and online resources for more information on the shutdown command and its options.

Created Time:2017-10-29 22:08:38  Author:lautturi