สรุป
บทความนี้ช่วยให้คุณรีเซ็ตไฟล์ Hosts กลับไปเป็นค่าเริ่มต้น
แฟ้ม Hosts คืออะไร
ไฟล์ Hosts ถูกใช้โดยระบบปฏิบัติการเพื่อแมปชื่อโฮสต์ที่เป็นมิตรกับมนุษย์ที่จะเป็นตัวเลขที่อยู่อินเทอร์เน็ตโพรโทคอล (IP) ที่ระบุและค้นหาโฮสต์ในเครือข่าย IP แฟ้มโฮสต์เป็นหนึ่งในทรัพยากรระบบหลายอย่างที่อยู่ในเครือข่ายโหนดในคอมพิวเตอร์และเป็นส่วนที่พบบ่อยของการดำเนินการ IP ของระบบปฏิบัติการ แฟ้ม Hosts ประกอบด้วยบรรทัดของข้อความที่ประกอบด้วยที่อยู่ IP ในเขตข้อมูลข้อความแรกตามด้วยชื่อโฮสต์หนึ่งหรือมากกว่า แต่ละเขตข้อมูลจะถูกคั่นด้วยช่องว่างสีขาว (แท็บมักจะเป็นที่ต้องการสำหรับเหตุผลทางประวัติศาสตร์แต่ยังมีการใช้ช่องว่าง) บรรทัดข้อคิดเห็นอาจรวมอยู่และจะระบุโดยอักขระ hash (#) ในตำแหน่งแรกของบรรทัดดังกล่าว บรรทัดที่ว่างเปล่าทั้งหมดในแฟ้มจะถูกละเว้น
หากไฟล์ Hosts ถูกเปลี่ยนจากค่าเริ่มต้นการรีเซ็ตจะช่วยแก้ไขปัญหาการเชื่อมต่อได้
การแก้ไข
การรีเซ็ตไฟล์ Hosts กลับไปเป็นค่าเริ่มต้นให้ทำตามขั้นตอนเหล่านี้ตามระบบปฏิบัติการของคุณ:
วินโดวส์10
การรีเซ็ตไฟล์ Hosts กลับไปเป็นค่าเริ่มต้นให้ทำตามขั้นตอนเหล่านี้:
-
เปิด Notepad การทำเช่นนี้ค้นหา "Notepad" โดยใช้Cortanaและจากนั้นเคาะหรือคลิกไอคอนNotepad
-
คัดลอกข้อความต่อไปนี้และวางข้อความลงในแฟ้ม: # Copyright (c) 1993-2006 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 handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost
-
บนเมนูแฟ้มเลือกบันทึกเป็นพิมพ์"โฮสต์"ในชื่อแฟ้มกล่อง (ดังที่แสดงในรูปต่อไปนี้), และจากนั้นบันทึกแฟ้มไปยังเดสก์ท็อป
-
ปิด Notepad
-
ค้นหา%Windir%\system32\na\dataโดยใช้Cortanaและจากนั้นเลือกไอคอนโฟลเดอร์แฟ้ม
-
แตะค้างไว้หรือคลิกขวาที่ไฟล์ Hosts เลือกเปลี่ยนชื่อและจากนั้นเปลี่ยนชื่อไฟล์เป็น "โฮสต์เก่า"
-
คัดลอกหรือย้ายแฟ้มโฮสต์ที่คุณสร้างไว้ในขั้นตอนที่3จากเดสก์ท็อปไปยังโฟลเดอร์%Windir\n\d%\e หากคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบให้เลือกดำเนินการต่อ
วินโดวส์๘.๑
การรีเซ็ตไฟล์ Hosts กลับไปเป็นค่าเริ่มต้นให้ทำตามขั้นตอนเหล่านี้:
-
เปิด Notepad หากต้องการทำเช่นนี้ให้ปัดเข้ามาจากขอบด้านขวาของหน้าจอแตะค้นหาพิมพ์Notepadแล้วแตะไอคอนNotepad หรือถ้าคุณกำลังใช้เมาส์ชี้ไปที่มุมขวาบนของหน้าจอให้เลื่อนตัวชี้เมาส์ลงคลิกค้นหาพิมพ์Notepadและจากนั้นคลิกแผ่นจดบันทึก
-
คัดลอกข้อความต่อไปนี้และวางข้อความลงในแฟ้ม: # Copyright (c) 1993-2006 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 handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost
-
บนเมนูแฟ้มเลือกบันทึกเป็นพิมพ์"โฮสต์"ในชื่อแฟ้มกล่อง (ดังที่แสดงในรูปต่อไปนี้), และจากนั้นบันทึกแฟ้มไปยังเดสก์ท็อป
-
ปิด Notepad
-
เปิดโฟลเดอร์%Windir\n\n%\e โดยทำตามขั้นตอนต่อไปนี้:
-
ปัดเข้ามาจากขอบด้านขวาของหน้าจอแล้วแตะค้นหาพิมพ์เรียกใช้แล้วแตะไอคอนเรียกใช้ หรือถ้าคุณกำลังใช้เมาส์ชี้ไปที่มุมขวาบนของหน้าจอให้เลื่อนตัวชี้เมาส์ลงแล้วเลือกการค้นหาพิมพ์รันแล้วเลือกไอคอนเรียกใช้
-
พิมพ์%Windir\system32nn\d\seในกล่องเปิดและจากนั้นเลือกตกลง
-
-
เลือกไฟล์ Hosts เลือกเปลี่ยนชื่อและจากนั้นเปลี่ยนชื่อแฟ้มเป็น "โฮสต์เก่า"
-
คัดลอกหรือย้ายแฟ้มโฮสต์ที่คุณสร้างไว้ในขั้นตอนที่3ไปยังโฟลเดอร์%Windir\n%\e หากคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบให้แตะหรือคลิกดำเนินการต่อ
Windows 7 และ Windows รุ่นก่อนหน้า
การรีเซ็ตไฟล์ Hosts กลับไปเป็นค่าเริ่มต้นด้วยตัวคุณเองให้ทำตามขั้นตอนเหล่านี้:
-
คลิกเริ่มคลิกเรียกใช้พิมพ์ Notepad และจากนั้นคลิกตกลง
-
คัดลอกข้อความต่อไปนี้ไปยังแฟ้ม: สำหรับ Windows 7 # Copyright (c) 1993-2006 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 handle within DNS itself. # 127.0.0.1 localhost # ::1 localhost สำหรับ Windows Vista หรือ windows Server ๒๐๐๘ # Copyright (c) 1993-2006 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 127.0.0.1 localhost ::1 localhost สำหรับ Windows XP หรือ windows Server ๒๐๐๓ # Copyright (c) 1993-1999 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 127.0.0.1 localhost
-
บนเมนูแฟ้มเลือกบันทึกเป็นพิมพ์"โฮสต์"ในชื่อแฟ้มกล่องและจากนั้นบันทึกแฟ้มไปยังเดสก์ท็อป
-
เลือกเริ่มต้น>เรียกใช้พิมพ์%Windir\system32\ เป็นต้นและจากนั้นให้เลือก' ตกลง '
-
เลือกไฟล์ Hosts และเปลี่ยนชื่อ "โฮสต์เก่า"
-
คัดลอกหรือย้ายแฟ้มโฮสต์ที่คุณสร้างไว้ในขั้นตอนที่3ไปยังโฟลเดอร์%Windir\n%\e หากคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบให้เลือกดำเนินการต่อ
ข้อมูลเพิ่มเติม
การสนับสนุนสำหรับ Windows XP ได้สิ้นสุดลงแล้ว
Microsoft สิ้นสุดการสนับสนุนสำหรับ Windows XP ในวันที่8เมษายน๒๐๑๔ การเปลี่ยนแปลงนี้ได้รับผลกระทบต่อการปรับปรุงซอฟต์แวร์และตัวเลือกความปลอดภัยของคุณ เรียนรู้สิ่งนี้หมายถึงคุณและวิธีการป้องกัน
การสนับสนุนสำหรับ Windows Server ๒๐๐๓สิ้นสุดในวันที่14กรกฎาคม๒๐๑๕
Microsoft สิ้นสุดการสนับสนุนสำหรับ Windows Server ๒๐๐๓ในวันที่14กรกฎาคม๒๐๑๕ การเปลี่ยนแปลงนี้ได้รับผลกระทบต่อการปรับปรุงซอฟต์แวร์และตัวเลือกความปลอดภัยของคุณ เรียนรู้สิ่งนี้หมายถึงคุณและวิธีการป้องกัน