Friday, 20 May 2011

Basic Linux commands – Part IV. Shutdown, Restart, Logout

Windows users shut down their computers from the Start button for ages. On Linux we restart our server with the shutdown command (while there is actually another command for that).

Shutdown
shutdown -h now
This will shutdown your server now. r stands for Halt. Don’t test this unless you really want to turn it off!
shutdown -h +30
This will shutdown your server after 30 minutes. Again, you don’t really need to test this.
shutdown -h 13:00
This will shutdown your server at 13:00 (or 1 PM) :) Again, don’t...

Restart
shutdown -r now
This will restart your server. r stands for Restart. Don’t test this unless you really want to restart it now! You can use the same parameters as with the h option.
Don’t abuse it, this is not a Windows desktop.

Logout
logout
Well, what would you expect this command to do?

Exit
exit
This will close your shell window.

No comments:

Post a Comment