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:
shutdown -h now
shutdown -r now
-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
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.