shutdown command brings the system down in a secure way. All logged-in users are notified that the system is going down, and login is blocked. It is possible to shut the system down immediately or after a specified delay. All processes are first notified that the system is going down by the signal SIGTERM. This gives programs like vi the time to save the file being edited, mail and news processing programs a chance to exit cleanly, etc. shutdown does its job by signalling the init process, asking it to change the runlevel. Runlevel 0 is used to halt the system, runlevel 6 is used to reboot the system, and runlevel 1 is used to put to system into a state where administrative tasks can be performed; this is the default if neither the -h or -r flag is given to shutdown. To see which actions are taken on halt or reboot see the appropriate entries for these runlevels in the file /etc/inittab.(http://linux.about.com/od/commands/l/blcmdl8_shutdow.htm)
Shutdown the machine immediately
Type the following command as root
# shutdown -h now
Shutdown the machine with user defined message
# shutdown -h now 'Server is going down for replace old hardware'
Scheduling the shutdown
Example, schedule shutdown for 3 AM.
# shutdown -h 03:00
Schedule shutdown the system in 5 minutes
# shutdown -h +5
Reboot the machine immediately
# shutdowm -r now
Cancel a running shutdown
# shutdown -c
- How Do I Block An IP Address On Linux Server ?
- 10 lsof Command Examples
- Repel port flood by CSF and IPT_Recent
- What is the role of this variables in php.ini file (expose_php – allow_url_fopen – register_globals) ?
- How To View Linux Last Reboot / Shutdown Date And Time
- Listing Of Last Reboot / Shutdown Date And Time
- How To Disable Ctrl + Alt + Del On Ubuntu 11
- How To Disable Ctrl + Alt + Del On Centos / RedHat
- How To Display All Cron Jobs On Linux
- How To Find Hard Drive Specifications