Halt

来自WordPress中文文档
跳转至: 导航搜索

Linux命令:halt

功能说明:关闭系统。
语  法:halt [-dfinpw]
补充说明:halt会先检测系统的runlevel。若runlevel为0或6,则关闭系统,否则即调用shutdown来关闭系统。
参  数:
 -d  不要在wtmp中记录。 
 -f  不论目前的runlevel为何,不调用shutdown即强制关闭系统。 
 -i  在halt之前,关闭全部的网络界面。 
 -n  halt前,不用先执行sync。 
 -p  halt之后,执行poweroff。 
 -w  仅在wtmp中记录,而不实际结束系统。


英文版本,欢迎翻译:

ABOUT HALT, POWEROFF, AND REBOOT

Stop the computer.

SYNTAX

halt [-l] [-n] [-q] [-y] or halt [-n] [-w] [-d] [-f] [-i] [-p] [-h]

reboot [-n] [-w] [-d] [-f] [-i] poweroff [-n] [-w] [-d] [-f] [-i] [-h]

-d Don't write the wtmp record. The -n flag implies -d. -h Put all harddrives on the system in standby mode just before halt or poweroff. -i Shut down all network interfaces just before halt or reboot. -l Suppress sending a message to the system log daemon, syslogd, about who executed halt . -n Prevent the sync before reboot or halt. -p When halting the system, do a poweroff. This is the default when halt is called as poweroff. -q Quick halt. No graceful shutdown is attempted. -r Force halt or reboot, don't call shutdown. -y Halt the system, even from a dialup terminal. -w Don't actually reboot or halt but only write the wtmp record (in the /var/log/wtmp file).


EXAMPLES

halt Set the computer to a mode that enables a user to turn off the computer.

poweroff Stop the processor (if you have proper permission).