windows命令提示符_从命令提示符关闭Windows是否会造成损坏?

windows命令提示符

windows命令提示符

does-using-windows-cmd-to-shut-down-a-computer-cause-damage-00

Most of us use the Start Menu to shut our Windows system down, but is it possible to cause damage if you choose to use the Command Line instead? Are there any particular commands that could cause damage while others do not? Today’s SuperUser Q&A post has the answer to a worried reader’s question.

我们大多数人都使用“开始”菜单关闭Windows系统,但是如果您选择使用“命令行”,是否有可能造成损害? 是否有任何可能导致损坏的特定命令,而其他命令则没有? 今天的《超级用户问答》帖子解答了一个担心的读者的问题。

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

今天的“问答”环节由SuperUser提供,它是Stack Exchange的一个分支,该社区是由社区驱动的Q&A网站分组。

Screenshot courtesy of Acid Pix (Flickr).

屏幕截图由Acid Pix(Flickr)提供

问题 (The Question)

SuperUser reader FlipFloop wants to know if using Windows CMD to shut down a computer can cause damage:

超级用户阅读器FlipFloop想知道使用Windows CMD关闭计算机是否会造成损坏:

When you launch shutdown -i to shut down a computer via the command prompt (CMD), does it damage the computer that is being turned off (either locally or remotely)?

当您启动shutdown -i通过命令提示符(CMD)关闭计算机时,它是否会损坏正在关闭的计算机(本地或远程)?

Does using Windows CMD to shut down a computer cause damage?

使用Windows CMD关闭计算机是否会造成损坏?

答案 (The Answer)

SuperUser contributors Marco Bonelli and LPChip have the answer for us. First up, Marco Bonelli:

超级用户贡献者Marco Bonelli和LPChip为我们提供了答案。 首先,Marco Bonelli:

The shutdown command in Windows performs a normal shutdown/reboot/logoff on the computer (locally or remotely). If you closed all of your running programs and saved your files, there is no difference between running any shutdown command (with any parameter) or using the Windows interface via the Start Menu. The command does not damage the computer or file system in any way.

Windows中的shutdown命令在计算机上(本地或远程)执行正常的关机/重新引导/注销。 如果关闭了所有正在运行的程序并保存了文件,则运行任何关闭命令(带有任何参数)或通过“开始”菜单使用Windows界面都没有区别。 该命令不会以任何方式损坏计算机或文件系统。

More About Running Programs

有关运行程序的更多信息

If any programs preventing the shutdown are running, Windows will automatically try to terminate them and, if that is not possible, will prompt you about it. The only problem you can have here arises with programs performing unsaved changes to files. If they provide an automatic recovery of improperly closed sessions like Microsoft Office for example, they will save their state to recover it on the next start, otherwise you will lose the unsaved data.

如果有任何阻止关机的程序正在运行,则Windows会自动尝试终止它们,如果无法终止,则会提示您有关问题。 您可能在这里遇到的唯一问题是程序对文件执行了未保存的更改。 例如,如果它们提供了对不正确关闭的会话(例如Microsoft Office)的自动恢复,则它们将保存其状态以在下次启动时恢复它,否则您将丢失未保存的数据。

Followed by the answer from LPChip:

随后是LPChip的回答:

No, it will not. When you use the Start Menu to shut down a computer, it will also use the same shutdown command, just with different parameters.

不,不会。 使用“开始”菜单关闭计算机时,它还将使用相同的关闭命令,只是参数不同。

The shutdown -i option was made to expose features that the Windows Start Menu does not offer without use of the Command Line. For example, shutdown -i can be used to send a shutdown command to another computer.

使用shutdown -i选项可以显示Windows开始菜单在不使用命令行的情况下不提供的功能。 例如, shutdown -i可用于将关机命令发送到另一台计算机。

In the same fashion that shutdown -i will not damage your computer, neither will shutdown -s -t 0.

shutdown -i不会损坏您的计算机, shutdown -s -t 0也不会损坏您的计算机。

There is also the -f option, which is used to force a shutdown. This will not damage your Windows system, but it may cause any unsaved data (such as an unsaved open word document) to be lost.

还有-f选项,用于强制关闭。 这不会损坏您的Windows系统,但是可能会导致所有未保存的数据(例如未保存的打开的Word文档)丢失。

Normally, Windows will show you a dialog of some sort like, “There is a program preventing shutdown. Do you want to cancel or continue anyway?” A timeout will eventually abort the shutdown. With the -f option, instead of showing you the message, it will assume that you wish to continue anyway and close any remaining programs.

通常,Windows会向您显示某种对话框,例如“有一个程序可以防止关机。 您是否要取消或继续?” 超时最终将终止关机。 使用-f选项,而不是向您显示消息,而是假定您仍然希望继续并关闭所有剩余程序。



Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

有什么补充说明吗? 在评论中听起来不错。 是否想从其他精通Stack Exchange的用户那里获得更多答案? 在此处查看完整的讨论线程

翻译自: https://www.howtogeek.com/259013/does-shutting-down-windows-from-the-command-prompt-cause-damage/

windows命令提示符

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值