diff --git a/sources/tech/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md b/sources/tech/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md deleted file mode 100644 index 51593f3c62..0000000000 --- a/sources/tech/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md +++ /dev/null @@ -1,96 +0,0 @@ -translating---geekpi - -Understanding Shutdown, Poweroff, Halt and Reboot Commands in Linux -============================================================ - - Download Your Free eBooks NOW - [10 Free Linux eBooks for Administrators][3] | [4 Free Shell Scripting eBooks][4] - -In this article, we will explain to you the difference between shutdown, poweroff, halt and reboot Linux commands. We will make clear what they actually do when you execute them with available options. - -If you are hoping to dive into Linux server administration, then these are [some of the important Linux commands][1] you need to fully understand for effective and reliable server administration. - -Normally, when you want to turn off or reboot your machine, you’ll run one of the commands below: - -### Shutdown Command - -shutdown schedules a time for the system to be powered down. It may be used to halt, power-off or reboot the machine. - -You may specify a time string (which is usually “now” or “hh:mm” for hour/minutes) as the first argument. Additionally, you may set a wall message to be sent to all logged-in users before the system goes down. - -Important: If the time argument is used, 5 minutes before the system goes down the /run/nologin file is created to ensure that further logins will not be allowed. - -Examples of shutdown commands: - -``` -# shutdown -# shutdown now -# shutdown 13:20 -# shutdown -p now #poweroff the machine -# shutdown -H now #halt the machine -# shutdown -r09:35 #reboot the machine at 09:35am -``` - -To cancel a pending shutdown, simply type the command below: - -``` -# shutdown -c -``` - -### Halt Command - -halt instructs the hardware to stop all CPU functions, but leaves it powered on. You can use it to get the system to a state where you can perform low level maintenance. - -Note that in some cases it completely shuts down the system. Below are examples of halt commands: - -``` -# halt #halt the machine -# halt -p #poweroff the machine -# halt --reboot #reboot the machine -``` - -### Power off Command - -poweroff sends an ACPI signal which instructs the system to power down. - -The following are examples of poweroff commands: - -``` -# poweroff #poweroff the machine -# poweroff --halt #halt the machine -# poweroff --reboot #reboot the machine -``` - -### Reboot Command - -reboot instructs the system to restart. - -``` -# reboot #reboot the machine -# reboot --halt #halt the machine -# reboot -p #poweroff the machine -``` - -That’s all! As mentioned earlier on, understanding these commands will enable to effectively and reliably manage Linux server in a multi-user environment. Do you have any additional ideas? Share them with us via the comments section below. - --------------------------------------------------------------------------------- - -作者简介: - -Aaron Kili is a Linux and F.O.S.S enthusiast, an upcoming Linux SysAdmin, web developer, and currently a content creator for TecMint who loves working with computers and strongly believes in sharing knowledge. - - --------------------------- - -via: https://www.tecmint.com/shutdown-poweroff-halt-and-reboot-commands-in-linux/ - -作者:[Aaron Kili ][a] -译者:[译者ID](https://github.com/译者ID) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]:https://www.tecmint.com/author/aaronkili/ -[1]:https://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/ -[2]:https://www.tecmint.com/author/aaronkili/ -[3]:https://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/ -[4]:https://www.tecmint.com/free-linux-shell-scripting-books/ diff --git a/translated/tech/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md b/translated/tech/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md new file mode 100644 index 0000000000..858ba53882 --- /dev/null +++ b/translated/tech/20170512 Understanding Shutdown, Poweroff Halt and Reboot Commands in Linux.md @@ -0,0 +1,93 @@ +理解 Linux 中的 shutdown、poweroff、halt 命令 +============================================================ + +现在下载你的免费电子书 - [10 本给管理员的免费 Linux 电子书][3] | [4 本免费的 shell 脚本电子书][4] + +在本篇中,我们会向你解释shitdown、poweroff、halt 以及 reboot 命令。我们会解释清楚当你用那些可用的选项执行的时候它们实际做了什么。 + +如果你想深入 Linux 服务器管理,那么为了有效和可靠的服务器管理,这些[重要的 Linux 命令][1]你需要完全理解。 + +通常上,当你想要关闭或者重启你的机器时,你会运行下面之一的命令: + +### shutdown 命令 + +shutdown 会给系统计划一个时间关机。它也许被用于停止、关机、重启机器。 + +你也许会指定一个时间字符串(通常是 “now” 或者 “hh:mm” 用于小时/分钟)作为第一个参数。额外地,你也可以设置一个广播信息在系统关闭前发送给所有已登录的用户。 + +重要:如果使用了时间参数,系统关机前 5 分钟,/run/nologin 文件会被创建来确保没有人可以再登录。 + +shutdown 命令示例: + +``` +# shutdown +# shutdown now +# shutdown 13:20 +# shutdown -p now #关闭机器 +# shutdown -H now #停止机器 +# shutdown -r09:35 #在 09:35am 重启机器 +``` + +要取消即将的关机,只要输入下面的命令: + +``` +# shutdown -c +``` + +### halt 命令 + +halt 通知硬件来停止所有的 CPU 功能,但是仍然保持通电。你可以用它使系统处于低层维护状态。 + +注意在有些情况会它会完全关闭系统。下面是 halt 命令示例: + +``` +# halt #停止机器 +# halt -p #关闭机器 +# halt --reboot #重启机器 +``` + +### poweroff 命令 + +poweroff 会发送一个 ACPI 信号来通知系统关机。 + +下面是 poweroff 命令示例: + +``` +# poweroff #关闭机器 +# poweroff --halt #停止机器 +# poweroff --reboot #重启机器 +``` + +### reboot 命令 + +reboot 通知系统重启。 + +``` +# reboot #重启机器 +# reboot --halt #停止机器 +# reboot -p #关闭机器 +``` + +就是这样了!如先前提到的,理解这些命令能够有效并可靠地在多用户环境下管理 Linux 服务器。你有一些额外的想法么?在评论区留言与我们分享。 + +-------------------------------------------------------------------------------- + +作者简介: + +Aaron Kili是一名 Linux 和 F.O.S.S 的爱好者,未来的 Linux 系统管理员、网站开发人员,目前是 TecMint 的内容创作者,他喜欢用电脑工作,并乐于分享知识。 + +-------------------------- + +via: https://www.tecmint.com/shutdown-poweroff-halt-and-reboot-commands-in-linux/ + +作者:[Aaron Kili ][a] +译者:[geekpi](https://github.com/geekpi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]:https://www.tecmint.com/author/aaronkili/ +[1]:https://www.tecmint.com/60-commands-of-linux-a-guide-from-newbies-to-system-administrator/ +[2]:https://www.tecmint.com/author/aaronkili/ +[3]:https://www.tecmint.com/10-useful-free-linux-ebooks-for-newbies-and-administrators/ +[4]:https://www.tecmint.com/free-linux-shell-scripting-books/