How can I restart a router from the shell instead of the command line?

Restart a router from the shell instead of the command line?

-The shutdown command brings the system down in a secure, planned manner. By default, it takes the system to single-user mode. Options can be used to halt or reboot the system instead.
-The command internally uses init with an appropriate run level argument to affect the system change.
-The mandatory time argument tells the shutdown command when to initiate the shutdown procedure. It can be a time of day in the form hh:m, or it can take the form +n, where n is a number of minutes to wait. time can also be the word now, in -which case the shutdown proceeds immediately.
-Also warning message is sent to the terminals of all users to alert them that the shutdown will take place. If the time specified is more than 15 minutes away, the command waits until 15 minutes
remain before shutdown to make its first announcement. No quoting is necessary in warning message unless the message includes special characters such as * or ‘.

Reset device/system.
Frequently used options
-h
Halt after shutdown(same as request system reboot )
-k
Don’t really shut down, but send the warning messages anyway.
-r
Reboot after shutdown(same as request system reboot in 0 )

Examples:
To reboot immediately
%shutdown -r now
To reboot in five minutes with a maintenance message:
%shutdown -r +5 “System maintenance is required”
To halt the system just before midnight tonight:
%shutdown –h 23:59
Sending a shutdown message for all users:
%shutdown -k now “shutting down in 10minutes”

Following are the two most common uses of shutdown by people who are on single-user systems, these cause an immediate halt or reboots, respectively.
%shutdown –h now
and:
%shutdown –r now

About the author

James Palmer

Leave a Comment