從命令提示符關閉視窗是否會導致損壞?

我們大多數人使用“開始”選單來關閉Windows系統,但如果您選擇使用命令列,是否可能造成損壞?有沒有什麼特別的命令會造成損害而其他命令不會?今天的超級使用者問答帖子回答了一位憂心忡忡的讀者的問題。...

從命令提示符關閉視窗是否會導致損壞?

我們大多數人使用“開始”選單來關閉Windows系統,但如果您選擇使用命令列,是否可能造成損壞?有沒有什麼特別的命令會造成損害而其他命令不會?今天的超級使用者問答帖子回答了一位憂心忡忡的讀者的問題。

今天的問答環節是由SuperUser提供的,SuperUser是Stack Exchange的一個分支,是一個由社群驅動的問答網站分組。

由Acid Pix(Flickr)提供的螢幕截圖。

問題

超級使用者讀取器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)?

使用Windows CMD關閉計算機會導致損壞嗎?

答案

超級使用者貢獻者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.

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 sessi*** like Microsoft Office for example, they will save their state to recover it on the next start, otherwise you will lose the unsaved data.

接著是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.

In the same fashion that shutdown -i will not damage your computer, neither will 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.

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.


有什麼要補充的解釋嗎?在評論中發出聲音。想從其他精通技術的Stack Exchange使用者那裡瞭解更多答案嗎?在這裡檢視完整的討論主題。

  • 發表於 2021-04-09 13:06
  • 閱讀 ( 32 )
  • 分類:網際網路

你可能感興趣的文章

Windows10中7種修復緩慢啟動時間的方法

...休眠,因此它不會出現。要啟用休眠,請開啟管理員命令提示符或PowerShell視窗。您可以透過右鍵單擊開始按鈕或單擊Win+X並選擇命令提示符(Admin)或Windows PowerShell(Admin)來完成此操作。 ...

  • 發佈於 2021-03-11 02:02
  • 閲讀 ( 57 )

8惱人的windows 10個問題及解決方法

...,請按Windows鍵+X並選擇Command Prompt(Admin)開啟管理命令提示符。然後輸入以下兩行,每行後按Enter鍵: ...

  • 發佈於 2021-03-11 02:55
  • 閲讀 ( 49 )

為什麼windows會崩潰?故障排除指南

...。右鍵單擊命令列以管理員身份執行程式。在提升的命令提示符視窗中,鍵入sfc/scannow並讓程式執行。它將掃描並修復所有損壞的系統檔案。 ...

  • 發佈於 2021-03-17 13:14
  • 閲讀 ( 57 )

如何在沒有工作管理員的情況下強制關閉程式

...管理員的程式,可以使用taskkill命令。通常,您會在命令提示符下輸入此命令以終止特定程序。然而,每次程式停止響應時開啟命令列視窗是很笨拙的,每次輸入命令都是一種浪費。使用快捷方式可以更輕鬆地強制關閉視窗。 ...

  • 發佈於 2021-03-18 04:22
  • 閲讀 ( 46 )

如何刪除其他程式正在使用的檔案

... 6透過命令提示符強制刪除正在使用的檔案 ...

  • 發佈於 2021-03-18 06:15
  • 閲讀 ( 58 )

如何修復windows停止碼記憶體管理bsod

...系統,並透過某些設定在執行時修復問題。您可以從命令提示符執行CHKDSK,它有很多漂亮的特性。 ...

  • 發佈於 2021-03-18 06:51
  • 閲讀 ( 59 )

mac關閉時間太長?7個小貼士

...20秒的關閉時間,然後會嘗試強制退出它們。透過將以下命令複製並貼上到終端應用程式中,可以將此時間從20秒減少到5秒: ...

  • 發佈於 2021-03-22 09:51
  • 閲讀 ( 74 )

如何修復Windows10上高cpu使用率的反惡意軟體服務可執行檔案

... 在“開始”選單搜尋欄中,鍵入cmd並開啟命令提示符。 在控制檯中,鍵入sfc/scannow並單擊Enter。 Windows需要一些時間掃描和修復損壞的系統檔案,包括Windows Defender的檔案。 ...

  • 發佈於 2021-03-26 13:41
  • 閲讀 ( 57 )

windows 10更新後速度慢嗎?下面是你可以修復它的方法

... 要執行系統檔案檢查器,必須使用命令提示符。按照下列步驟操作: ...

  • 發佈於 2021-03-27 04:04
  • 閲讀 ( 55 )

8種解決無法開啟的不和諧的簡單方法

... 開啟命令提示符實用程式。 鍵入以下命令並按Enter鍵。ipconfig/重新整理DNS 您的DNS快取現在已刪除。 ...

  • 發佈於 2021-03-28 10:51
  • 閲讀 ( 56 )
南梔北笙5
南梔北笙5

0 篇文章

作家榜

  1. admin 0 文章
  2. 孫小欽 0 文章
  3. JVhby0 0 文章
  4. fvpvzrr 0 文章
  5. 0sus8kksc 0 文章
  6. zsfn1903 0 文章
  7. w91395898 0 文章
  8. SuperQueen123 0 文章