shutdown/reboot Linux machine

if we want to reboot Linux we have two useful command:
reboot now
and it will reboot the machine immediately.
Anther option is to use the shutdown command.
shutdown -r now
and it will have the same effect like the previous command.

if we want to shutdown the machine then we can run:
shutdown -h now

if we want to shutdown at a specific time like 14:30 then we can:
shutdown -h 14:30

if we want to shutdown in 5 minutes:
shutdown -h +5

if we want to cancel future shutdown:
shutdown -c

This commands demand root privilege, so you may need sudo or just be root user.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s