📄 302.html
字号:
<div align=center><font class=normalfont>搜索文章:
<input type=hidden value=result name=action2>
<input type=radio checked value=title name=type>标题
<input type=radio value=content name=type>内容
<input type=image src="images/button_go.gif" tppabs="http://www.linuxhero.com/docs/images/button_go.gif" border=0 name=image2>
</font></div>
</td>
</tr>
<tr>
<td noWrap>
<div align="center">
<input maxlength=100 size=30 name=keyword2>
</div>
</td>
</tr></tbody>
</table>
</form>
</TD>
<TD rowSpan=2><IMG src="images/header_r1_c7.gif" tppabs="http://www.linuxhero.com/docs/images/header_r1_c7.gif" width=26 border=0 name=header_r1_c7></TD>
<TD><IMG height=83 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1 border=0></TD></TR>
<TR>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif"><IMG height=22
src="images/header_r2_c1.gif" tppabs="http://www.linuxhero.com/docs/images/header_r2_c1.gif" width=296 border=0
name=header_r2_c1></TD>
<TD background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colSpan=5>
<DIV align=right><FONT class=normalfont>当前位置:
<A href="index.html" tppabs="http://www.linuxhero.com/docs/index.html">本站首页</A>
<font color="#FF6699">>></font>
<A href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</A> | <A href="copyright.html" tppabs="http://www.linuxhero.com/docs/copyright.html">版权说明</A></font></DIV>
</TD>
<TD><IMG height=22 src="images/spacer.gif" tppabs="http://www.linuxhero.com/docs/images/spacer.gif" width=1
border=0></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=10 cellPadding=0 width="100%" bgColor=#ffffff
border=0>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%" border=0>
<TR>
<TD vAlign=top align=middle width="60%">
<TABLE cellSpacing=0 cellPadding=0 width="100%"
background="images/back.gif" tppabs="http://www.linuxhero.com/docs/images/back.gif" border=0>
<TBODY>
<TR>
<TD vAlign=top width="80%">
<DIV align=center>
<FORM action="search.html" tppabs="http://www.linuxhero.com/docs/search.html" method=get>
</FORM>
<TABLE cellSpacing=0 cellPadding=0 width="95%"
border=0><TBODY>
<TR>
<TD background="images/bgi.gif" tppabs="http://www.linuxhero.com/docs/images/bgi.gif"
height=30></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=3 width="95%"
align=center border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=3 width="100%"
border=0>
<TBODY>
<TR>
<TD vAlign=top>
<p><FONT class=normalfont><B><font color=blue>shutdown</font></B></FONT><BR><FONT class=smallfont color=#ff9900>2004-04-23 15:18 pm</FONT><BR><FONT class=normalfont>作者:作者<br>来自:Linux知识宝库<br>联系方式:无名<br><br>让系统关机 <br>
名称 <br>
shutdown - 让系统关机 <br>
<br>
摘要 <br>
/sbin/shutdown [-t 秒] [-rkhncfF] 时间 [警告讯息] <br>
<br>
描述 <br>
shutdown 会 安 全 地 将 系 统 关 机 。 在 系 统 将 要 关 机 前 , 所 有 登 入 的 使 用 者 都 会 被 通 知 , 而 且 login(1) 这 个 指 令 会 被 冻 结 。 直 接 关 机 或 者 是 延 迟 一 段 特 定 的 时 间 才 关 机 都 是 有 可 能 的 , 这 是 藉 着 所 有 程 序 (process) 都 会 收 到 系 统 所 送 达 的 信 号 (signal) SIGTERM. 这 让 一 些 象 vi(1) 这 一 类 的 程 式 有 时 间 可 以 储 存 目 前 正 在 编 ? 的 档 案 , 而 象 处 理 邮 件 (mail) 和 新 闻 (news) 的 程 式 可 以 正 常 地 离 开 等 等 。 shutdown 执 行 他 的 工 作 是 藉 着 送 信 号 (signal) 给 init 程 序 , 要 求 他 改 变 runlevel. Runlevel 0 是 被 用 来 停 机 (halt) , runlevel 6 则 是 用 来 重 新 启 动 (reboot) 系 统 , 而 runlevel 1 则 是 被 用 来 让 系 统 进 入 管 理 工 作 可 以 进 行 的 状 态 ; 这 是 预 设 的 , 假 如 没 有 -h 也 没 有 -r 参 数 给 shutdown 。 要 想 了 解 在 停 机 (halt) 或 者 重 新 开 机 (reboot) 过 程 中 做 了 哪 些 动 作 , 你 可 以 在 这 个 档 案 /etc/inittab 里 看 到 这 些 runlevels 相 关 的 资 料。 <br>
<br>
选项 <br>
-t 秒 在 改 变 到 其 他 runlevel 之 前 , 告 诉 init(8) 在 送 警 告 讯 息 和 送 kill 信 号 (signal) 给 所 有 程 序 这 两 件 事 之 间 , 要 等 待 多 少 秒 。 <br>
-k <br>
并 不 会 真 的 关 机 ; 只 是 送 警 告 讯 息 给 每 位 使 用 者 。 <br>
-r <br>
在 系 统 关 机 后 重 新 开 机。 <br>
-h <br>
在 关 机 后 停 机 (halt) 。 <br>
-n <br>
[不赞成] 不 呼 叫 init(8) 来 做 关 机 动 作 , 反 而 自 己 来 做 。 这 个 选 项 是 不 被 鼓 励 使 用 的 , 而 所 产 生 的 后 果 并 不 总 是 如 你 所 预 期 的 。 <br>
-f <br>
在 重 新 开 机 (reboot) 时 忽 略 fsck <br>
-F <br>
在 重 新 开 机 (reboot) 时 强 迫 fsck <br>
-c <br>
取 消 目 前 正 在 执 行 的 关 机 程 序 。 而 这 个 选 项 当 然 不 可 能 会 有 时间 这 个 参 数 , 但 你 可 以 输 入 一 个 用 来 解 释 的 讯 息 , 而 这 讯 息 将 会 送 达 每 位 使 用 者 。 <br>
时间 <br>
关 机 (shutdown) 的 时 间 。 <br>
警告讯息 <br>
送 给 每 位 使 用 者 的 讯 息 。 <br>
这 个 时 间 参 数 可 以 有 不 同 的 格 式 。 首 先 , 它 可 以 是 这 种 格 式 hh:mm 的 绝 对 时 间 , 而 在 此 的 hh 是 指 小 时 (一 位 或 者 两 位 数 字) , 而 mm 则 是 指 分 钟 (两 位 数 字) 。 第 二 , 他 也 可 以 用 这 种 格 式 +m 表 示 , 在 这 里 m 这 个 数 字 代 表 是 指 要 等 待 几 分 钟 。 而 这 个 字 now 则 是 等 于 +0 。 <br>
<br>
这 个 旗 标 -f 代 表 的 是 快 速 重 新 开 机 (reboot fast) 。 这 会 产 生 一 个 参 考 性 质 的 档 案 /fastboot , 而 他 会 在 系 统 重 新 启 动 时 被 检 查 。 这 个 开 机 的 rc 档 案 可 以 去 检 查 这 个 档 案 是 否 存 在 , 而 决 定 不 去 执 行 fsck(1) , 因 为 这 系 统 已 ? 以 适 当 的 方 式 关 了 机 。 在 这 之 后 , 这 个 开 机 程 序 将 会 移 除 /fastboot 这 个 档 案 。 <br>
<br>
这 个 旗 标 -F 意 味 着 强 迫 执 行 fsck (force fsck) 。 这 会 产 生 一 个 参 考 性 质 的 档 案 /forcefsck , 而 他 会 在 系 统 重 新 启 动 时 被 检 查 。 这 个 开 机 的 rc 档 案 可 以 去 检 查 这 个 档 案 是 否 存 在 , 而 去 执 行 fsck(1) 并 加 上 特 别 的 参 数 `force' , 让 那 些 没 有 适 当 卸 载 (unmount) 的 档 案 系 统 也 会 被 检 查 。 在 这 之 后 , 这 个 开 机 程 序 将 会 移 除 /forcefsck 这 个 档 案 。 <br>
<br>
这 个 旗 标 -n 会 造 成 shutdown 不 去 呼 叫 init , 反 而 去 杀 掉 所 有 正 在 执 行 的 程 序 。 shutdown 然后 将 会 关 掉 (turn off) 硬 碟 限 额 (quota) , 会 计 (accounting) , 以 及 交 换 (swapping) 和 卸 载 掉 (umount) 所 有 的 档 案 系 统。 <br>
<br>
使用控制 <br>
当 这 神 奇 的 按 键 CTRL-ALT-DEL 被 按 下 时 , shutdown 会 被 init(8) 所 呼 叫 , 这 是 藉 着 在 /etc/inittab 这 个 档 案 里 加 入 适 当 的 资 料 。 这 意 味 着 每 个 可 以 接 触 主 控 台 (console) 按 键 的 人 都 可 以 关 掉 系 统 。 会 了 避 免 这 样 , shutdown 可 以 检 查 是 否 有 符 合 资 格 的 使 用 者 登 入 某 个 虚 拟 控 制 台 。 假 如 shutdown 被 init(8) 呼 叫 时 , 它 会 检 查 这 个 档 案 /etc/shutdown.allow 是 否 存 在 , 然 后 比 较 在 这 档 案 所 列 出 的 登 入 名 称 和 登 入 在 虚 拟 控 制 台 (virtual console) 的 使 用 者 ( 从 这 个 档 案 /var/run/utmp 得 知 ), 只 有 当 其 中 有 位 符 合 资 格 的 使 用 者 或 root 已 ? 登 入 , 它 才 会 被 执 行 。 否 则 他 会 秀 出 这 些 讯 息 <br>
<br>
shutdown: no authorized users logged in <br>
<br>
到 系 统 的 ( 实 际 上 ) 主 控 台 (console) 。 这 个 档 案 /etc/shutdown.allow 的 格 式 是 每 行 只 能 有 一 个 使 用 者 名 称 。 空 白 行 和 注 解 行 ( 字 首 为 # ) 都 是 被 允 许 的 。 目 前 这 个 档 案 限 制 只 能 有 32 位 使 用 者 。 <br>
<br>
相关档案 <br>
/fastboot /etc/inittab /etc/init.d/halt /etc/init.d/reboot /etc/shutdown.allow <br>
<br>
臭虫 <br>
并 不 是 真 的 有 臭 虫 (bug) , 是 因 为 大 部 份 的 使 用 者 忘 了 给 时间 这 个 参 数 , 而 让 shutdown 所 产 生 的 错 误 讯 息 给 搞 糊 涂 了 。 这 个 时间 参 数 是 一 定 要 有 的 ; 而 十 次 中 会 有 九 次 这 个 参 数 会 是 now 这 个 字 哦 ! <br>
<br>
作者 <br>
Miquel van Smoorenburg, miquels@cistron.nl <br>
<br>
相关说明 <br>
fsck(8) , init(1) , halt(8) , reboot(8)(BP 1.0)
</FONT><br>
</TD>
</TR>
<TR>
<TD colSpan=2><FONT
class=middlefont></FONT><BR>
<FONT
class=normalfont>全文结束</FONT> </TD>
</TR>
<TR>
<TD background="images/dot.gif" tppabs="http://www.linuxhero.com/docs/images/dot.gif" colSpan=2
height=10></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV></TD>
<TD vAlign=top width="20%"
background="images/line.gif" tppabs="http://www.linuxhero.com/docs/images/line.gif" rowSpan=2>
<DIV align=center>
<table class=tableoutline cellspacing=1 cellpadding=4
width="100%" align=center border=0>
<tr class=firstalt>
<td noWrap background="images/bgline.gif" tppabs="http://www.linuxhero.com/docs/images/bgline.gif" colspan=2 height=21>
<font class=normalfont><b>所有分类</b></font></td>
</tr>
<tr class=secondalt> <td noWrap width=27%> <font class=normalfont>1:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type1.html" tppabs="http://www.linuxhero.com/docs/type1.html">非技术类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>2:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type2.html" tppabs="http://www.linuxhero.com/docs/type2.html">基础知识</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>3:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type3.html" tppabs="http://www.linuxhero.com/docs/type3.html">指令大全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>4:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type4.html" tppabs="http://www.linuxhero.com/docs/type4.html">shell</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>5:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type5.html" tppabs="http://www.linuxhero.com/docs/type5.html">安装启动</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>6:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type6.html" tppabs="http://www.linuxhero.com/docs/type6.html">xwindow</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>7:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type7.html" tppabs="http://www.linuxhero.com/docs/type7.html">kde</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>8:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type8.html" tppabs="http://www.linuxhero.com/docs/type8.html">gnome</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>9:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type9.html" tppabs="http://www.linuxhero.com/docs/type9.html">输入法类</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>10:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type10.html" tppabs="http://www.linuxhero.com/docs/type10.html">美化汉化</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>11:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type11.html" tppabs="http://www.linuxhero.com/docs/type11.html">网络配置</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>12:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type12.html" tppabs="http://www.linuxhero.com/docs/type12.html">存储备份</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>13:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type13.html" tppabs="http://www.linuxhero.com/docs/type13.html">杂项工具</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>14:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type14.html" tppabs="http://www.linuxhero.com/docs/type14.html">编程技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>15:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type15.html" tppabs="http://www.linuxhero.com/docs/type15.html">网络安全</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>16:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type16.html" tppabs="http://www.linuxhero.com/docs/type16.html">内核技术</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>17:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type17.html" tppabs="http://www.linuxhero.com/docs/type17.html">速度优化</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>18:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type18.html" tppabs="http://www.linuxhero.com/docs/type18.html">apache</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>19:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type19.html" tppabs="http://www.linuxhero.com/docs/type19.html">email</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>20:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type20.html" tppabs="http://www.linuxhero.com/docs/type20.html">ftp服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>21:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type21.html" tppabs="http://www.linuxhero.com/docs/type21.html">cvs服务</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>22:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type22.html" tppabs="http://www.linuxhero.com/docs/type22.html">代理服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>23:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type23.html" tppabs="http://www.linuxhero.com/docs/type23.html">samba</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>24:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type24.html" tppabs="http://www.linuxhero.com/docs/type24.html">域名服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>25:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type25.html" tppabs="http://www.linuxhero.com/docs/type25.html">网络过滤</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>26:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type26.html" tppabs="http://www.linuxhero.com/docs/type26.html">其他服务</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>27:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type27.html" tppabs="http://www.linuxhero.com/docs/type27.html">nfs</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>28:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type28.html" tppabs="http://www.linuxhero.com/docs/type28.html">oracle</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>29:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type29.html" tppabs="http://www.linuxhero.com/docs/type29.html">dhcp</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>30:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type30.html" tppabs="http://www.linuxhero.com/docs/type30.html">mysql</a></font></td> </tr> </table></td></tr><tr class=secondalt> <td noWrap width=27%> <font class=normalfont>31:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type31.html" tppabs="http://www.linuxhero.com/docs/type31.html">php</a></font></td> </tr> </table></td></tr><tr class=firstalt> <td noWrap width=27%> <font class=normalfont>32:</font> </td><td noWrap width=73%> <table width=100% border=0> <tr> <td><font class=normalfont><a href="type32.html" tppabs="http://www.linuxhero.com/docs/type32.html">ldap</a></font></td> </tr> </table></td></tr> </table>
</DIV></TD></TR>
<TR vAlign=top>
<TD width="80%">
<DIV align=center><BR>
</DIV>
</TD></TR></TBODY></TABLE></TD></TR>
</TABLE></TD></TR>
</TABLE>
<TABLE cellSpacing=0 cellPadding=4 width="100%" bgColor=#eeeeee
border=0><TBODY>
<TR>
<TD width="50%">
<P><FONT class=middlefont>版权所有 © 2004 <A
href="mailto:bjchenxu@sina.com">linux知识宝库</A><BR>
违者必究. </FONT></P>
</TD>
<TD width="50%">
<DIV align=right><FONT class=middlefont>Powered by: <A
href="mailto:bjchenxu@sina.com">Linux知识宝库</A> Version 0.9.0 </FONT></DIV>
</TD></TR></TBODY></TABLE>
<CENTER></CENTER></TD></TR>
</TABLE></CENTER></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -