- Shutdown the computer immediately (don't power down). Note that in UNIX systems this kind of shutdown means to go to "single-user mode". Single-user mode is a mode where only the administrator (root) has access to the computer, this mode is designed for maintenance and is often used for repairs.
[root@myserver ~]# shutdown now
/sbin/shutdown [-t sec] [-arkhncfFHP] time [warning-message]
OPTIONS
-a Use /etc/shutdown.allow.
-t sec Tell init to wait sec seconds between sending processes the warning and the kill signal, before changing to another run-level.
-k Don't really shutdown; only send the warning messages to everybody.
-r Reboot after shutdown.
-h Halt or poweroff after shutdown.
-H Halt action is to halt or drop into boot monitor on systems that support it.
-P Halt action is to turn off the power.
-n [DEPRECATED] Don't call init to do the shutdown but do it ourself. The use of this option is discouraged, and its results are not always what you'd expect.
-f Skip fsck on reboot.
-F Force fsck on reboot.
-c Cancel an already running shutdown. With this option it is of course not possible to give the time argument, but you can enter a explanatory message on the command line that will be sent to all users.
time When to shutdown.
warning-message Message to send to all users.
- Shutdown (-h = halt) the computer immediately. It begins the shutdown procedure, press CTRL-C (break-key) to stop it. After the end of the command you can also leave a message in quotation marks which will be broad-casted to all users.
[root@myserver ~]# shutdown -h now "Warning system malfunction, self-destruct imminent"
- On some systems, shutdown -h and halt do not actually turn the system's power off. On systems that do not power off with these commands use the poweroff command
halt
[root@myserver ~]# poweroff
/sbin/poweroff [-n] [-w] [-d] [-f] [-i] [-h]
OPTIONS
-n Don't sync before reboot or halt. Note that the kernel and storage drivers may still sync.
-w Don't actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
-d Don't write the wtmp record. The -n flag implies -d.
-f Force halt or reboot, don't call shutdown.
-i Shut down all network interfaces just before halt or reboot.
-h Put all harddrives on the system in standby mode just before halt or poweroff.
- Shutting down at a particular time
[root@myserver ~]# shutdown -h 16:16
- Shutdown ( -r = reboot) the computer immediately. It begins the reboot procedure, press CTRL-C (break-key) to stop it. After the end of the command you can also leave a message in quotation marks which will be broad-casted to all users.
[root@myserver ~]# shutdown -r now "Warning system rebooting, all files will be destroyed"
[root@myserver ~]# reboot
/sbin/reboot [-n] [-w] [-d] [-f] [-i]
OPTIONS
-n Don't sync before reboot or halt. Note that the kernel and storage drivers may still sync.
-w Don't actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).
-d Don't write the wtmp record. The -n flag implies -d.
-f Force halt or reboot, don't call shutdown.
-i Shut down all network interfaces just before halt or reboot.
- Rebooting at a particular time
[root@myserver ~]# shutdown -r 16:16
No comments:
Post a Comment