Windows XP Windows 7 Windows 2003 Windows Vista Windows 綜合教學 Linux 系統教學
Windows 10 Windows 8 Windows 2008 Windows NT Windows Server 電腦軟體教學
您现在的位置: Windows教程網 >> Windows教程 >  >> Windows 綜合教學 >> 關於 Windows

Win7 清理 hosts 檔案完整教學:恢復預設、移除惡意導向

編輯:關於 Windows

Hosts 檔案(C:\Windows\System32\drivers\etc\hosts)是本機 DNS 解析對照表,常被惡意軟體修改導向釣魚網站、封鎖更新伺服器或植入廣告。定期清理恢復預設可提升網路安全。

操作步驟

  1. 開啟「電腦」,網址列輸入 C:\Windows\System32\drivers\etc\hosts 按 Enter。
  2. 開啟 hosts 路徑

  3. 選擇「記事本」開啟。
  4. 選擇記事本

  5. 檔案前段為說明註解(以 # 開頭),標準預設內容僅包含:
    127.0.0.1 localhost
    ::1 localhost
  6. hosts 原始內容

    標準 hosts 內容

  7. 若發現額外網域對應(如導向 127.0.0.1 或陌生 IP),直接清空全檔內容,僅保留上述兩行標準預設值,存檔(需管理員權限)。

重要提醒

  • Hosts 檔案為系統檔案,修改需以系統管理員身分執行記事本才能存檔。
  • 某些企業環境/特殊軟體需自訂 hosts,清理前請確認不影響業務。
  • 建議設定檔案屬性為「唯讀」防止惡意程式竄改,或使用「Hosts 管理工具」鎖定。

定期檢查 hosts 檔案是維護網路安全的基本功課。更多系統安全技巧請關注本站!

Copyright © Windows教程網 All Rights Reserved