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) 被惡意軟體竄改、或誤刪導致網頁無法開啟?將檔案還原為 Microsoft 官方標準內容即可徹底修復。

修復步驟

  1. 定位檔案:Win + R → C:\Windows\System32\drivers\etc → Enter。

hosts 檔案位置

執行路徑開啟資料夾

  1. 將 hosts 複製到桌面 → 記事本開啟。

複製到桌面編輯

  1. 清空全部內容,貼上官方標準內容:
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
# Additionally, comments (such as these) may be inserted on individual
# lines or following the machine name denoted by a '#' symbol.
#
# For example:
#
#       102.54.94.97     rhino.acme.com     # source server
#       38.25.63.10      x.acme.com         # x client host

# localhost name resolution is handled within DNS itself.
# 127.0.0.1       localhost
# ::1             localhost

官方標準 hosts 內容

  1. 存檔 → 將修改後的 hosts 複製回 C:\Windows\System32\drivers\etc 覆蓋舊檔 (需管理員權限)。

覆蓋回原位置

補充:若無法覆蓋 (權限/被佔用),可用 Unlocker 釋放鎖定、或進安全模式操作、或用 PE 環境替換。修復後瀏覽器網頁解析即恢復正常。

此法適用 WinXP/7/8/10/11/Server 所有版本,hosts 標準內容通用。

Copyright © Windows教程網 All Rights Reserved