ข้ามไปที่เนื้อหาหลัก
การสนับสนุน
ลงชื่อเข้าใช้
ลงชื่อเข้าใช้ด้วย Microsoft
ลงชื่อเข้าใช้หรือสร้างบัญชี
สวัสดี
เลือกบัญชีอื่น
คุณมีหลายบัญชี
เลือกบัญชีที่คุณต้องการลงชื่อเข้าใช้

สรุป

บทความนี้จะช่วยคุณรีเซ็ตไฟล์โฮสต์กลับเป็นค่าเริ่มต้น

ไฟล์โฮสต์คืออะไร

ไฟล์โฮสต์ถูกใช้โดยระบบปฏิบัติการเพื่อแมปชื่อโฮสต์ที่เป็นมิตรกับมนุษย์กับที่อยู่อินเทอร์เน็ตโพรโทคอล (IP) ที่เป็นตัวเลขซึ่งระบุและค้นหาโฮสต์ในเครือข่าย IP ไฟล์โฮสต์เป็นหนึ่งในทรัพยากรระบบหลายอย่างที่จัดการโหนดเครือข่ายในเครือข่ายคอมพิวเตอร์และเป็นส่วนทั่วไปของการใช้งาน IP ของระบบปฏิบัติการ

ไฟล์โฮสต์จะมีบรรทัดข้อความซึ่งประกอบด้วยที่อยู่ IP ในเขตข้อมูลข้อความแรกตามด้วยชื่อโฮสต์อย่างน้อยหนึ่งชื่อ แต่ละเขตข้อมูลจะถูกคั่นด้วยพื้นที่สีขาว (แท็บมักจะเป็นที่ต้องการด้วยเหตุผลทางประวัติศาสตร์ แต่จะมีการใช้ช่องว่างด้วย) บรรทัดข้อคิดเห็นอาจรวมอยู่ด้วย และจะถูกระบุด้วยอักขระแฮช (#) ในตําแหน่งแรกของบรรทัดดังกล่าว บรรทัดว่างทั้งหมดในไฟล์จะถูกละเว้น

หากไฟล์ Hosts ถูกเปลี่ยนจากค่าเริ่มต้น การรีเซ็ตสามารถช่วยแก้ไขปัญหาการเชื่อมต่อบางอย่างได้

การแก้ไข

หากต้องการรีเซ็ตไฟล์ Hosts กลับเป็นค่าเริ่มต้น ให้ทําตามขั้นตอนเหล่านี้ตามระบบปฏิบัติการของคุณ:

การรีเซ็ตไฟล์ Hosts กลับเป็นค่าเริ่มต้น ให้ทําตามขั้นตอนต่อไปนี้:

1. เปิดแผ่นจดบันทึก เมื่อต้องการทําเช่นนี้ ให้ค้นหา "แผ่นจดบันทึก" แล้วแตะหรือคลิกไอคอนแผ่นจดบันทึก

2. คัดลอกข้อความต่อไปนี้ แล้ววางข้อความลงในไฟล์:

  • # 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

3. บนเมนู ไฟล์ ให้เลือก บันทึกเป็น พิมพ์ "โฮสต์" ในกล่อง ชื่อไฟล์ (ตามที่แสดงในรูปต่อไปนี้) แล้วบันทึกไฟล์ลงในเดสก์ท็อป สกรีนช็อตแสดงวิธีการบันทึกไฟล์ "โฮสต์"

4. ปิดแผ่นจดบันทึก

5. ค้นหา %WinDir%\System32\Drivers\Etc แล้วเลือกไอคอนโฟลเดอร์ไฟล์

6. แตะค้างหรือคลิกขวาที่ไฟล์ โฮสต์ เลือก เปลี่ยนชื่อ จากนั้นเปลี่ยนชื่อไฟล์เป็น "Hosts.old"

7. คัดลอกหรือย้ายไฟล์โฮสต์ที่คุณสร้างไว้ในขั้นตอนที่ 3 จากเดสก์ท็อปไปยังโฟลเดอร์ %WinDir%\System32\Drivers\Etc ถ้าคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบ ให้เลือก ดําเนินการต่อ

การรีเซ็ตไฟล์ Hosts กลับเป็นค่าเริ่มต้น ให้ทําตามขั้นตอนต่อไปนี้:

1. เปิดแผ่นจดบันทึก เมื่อต้องการทําเช่นนี้ ให้ค้นหา "แผ่นจดบันทึก" โดยใช้ Cortana แล้วแตะหรือคลิกไอคอนแผ่นจดบันทึก

2. คัดลอกข้อความต่อไปนี้ แล้ววางข้อความลงในไฟล์:

  • # 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

3. บนเมนู ไฟล์ ให้เลือก บันทึกเป็น พิมพ์ "โฮสต์" ในกล่อง ชื่อไฟล์ (ตามที่แสดงในรูปต่อไปนี้) แล้วบันทึกไฟล์ลงในเดสก์ท็อป สกรีนช็อตแสดงวิธีการบันทึกไฟล์ "โฮสต์"

4. ปิดแผ่นจดบันทึก

5. ค้นหา %WinDir%\System32\Drivers\Etc โดยใช้ Cortana แล้วเลือกไอคอนโฟลเดอร์ไฟล์

6. แตะค้างหรือคลิกขวาที่ไฟล์ โฮสต์ เลือก เปลี่ยนชื่อ จากนั้นเปลี่ยนชื่อไฟล์เป็น "Hosts.old"

7. คัดลอกหรือย้ายไฟล์โฮสต์ที่คุณสร้างไว้ในขั้นตอนที่ 3 จากเดสก์ท็อปไปยังโฟลเดอร์ %WinDir%\System32\Drivers\Etc ถ้าคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบ ให้เลือก ดําเนินการต่อ

การรีเซ็ตไฟล์ Hosts กลับเป็นค่าเริ่มต้น ให้ทําตามขั้นตอนต่อไปนี้:

1. เปิดแผ่นจดบันทึก เมื่อต้องการทําเช่นนี้ ให้ปัดเข้ามาจากขอบขวาของหน้าจอ แตะ ค้นหา พิมพ์ แผ่นจดบันทึก แล้วแตะไอคอนแผ่นจดบันทึก หรือถ้าคุณกําลังใช้เมาส์ ให้ชี้ไปที่มุมขวาบนของหน้าจอ เลื่อนตัวชี้เมาส์ลง แล้วคลิก ค้นหา พิมพ์ แผ่นจดบันทึก แล้วคลิก แผ่นจดบันทึก

2. คัดลอกข้อความต่อไปนี้ แล้ววางข้อความลงในไฟล์:

  • # 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

3. บนเมนู ไฟล์ ให้เลือก บันทึกเป็น พิมพ์ "โฮสต์" ในกล่อง ชื่อไฟล์ (ตามที่แสดงในรูปต่อไปนี้) แล้วบันทึกไฟล์ลงในเดสก์ท็อป

  • บนเมนู ไฟล์ ให้เลือก บันทึกเป็น พิมพ์ "โฮสต์" ในกล่อง ชื่อไฟล์ (ดังที่แสดงในรูปต่อไปนี้) แล้วบันทึกไฟล์ลงในเดสก์ท็อป

4. ปิดแผ่นจดบันทึก

5. เปิดโฟลเดอร์ %WinDir%\System32\Drivers\Etc โดยทำตามขั้นตอนต่อไปนี้:

  • a.  ปัดเข้ามาจากขอบขวาของหน้าจอ แตะ ค้นหา พิมพ์ เรียกใช้ แล้วแตะไอคอน เรียกใช้ หรือถ้าคุณกําลังใช้เมาส์ ให้ชี้ไปที่มุมขวาบนของหน้าจอ เลื่อนตัวชี้เมาส์ลง แล้วเลือก ค้นหา พิมพ์ เรียกใช้ แล้วเลือกไอคอน เรียกใช้

  • b.  พิมพ์ %WinDir%\System32\Drivers\Etc ในกล่อง เปิด แล้วเลือก ตกลง

6. เลือกไฟล์ โฮสต์ เลือก เปลี่ยนชื่อ จากนั้นเปลี่ยนชื่อไฟล์เป็น "Hosts.old"

7. คัดลอกหรือย้ายไฟล์โฮสต์ที่คุณสร้างไว้ในขั้นตอนที่ 3 ไปยังโฟลเดอร์ %WinDir%\System32\Drivers\Etc หากคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบ ให้แตะหรือคลิก ดําเนินการต่อ

เมื่อต้องการรีเซ็ตไฟล์โฮสต์กลับไปเป็นค่าเริ่มต้นด้วยตัวคุณเอง ให้ทําตามขั้นตอนเหล่านี้:

  1. คลิก เริ่ม คลิก เรียกใช้ พิมพ์ Notepadแล้วคลิก ตกลง

  2. ค้นหา Windows เวอร์ชันของคุณจากรายการด้านล่าง แล้วคัดลอกข้อความต่อไปนี้สําหรับ Windows เวอร์ชันนั้น แล้ววางลงใน 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 2008:

  • # 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 2003:

  • # 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

3. บนเมนู ไฟล์ ให้เลือก บันทึกเป็น พิมพ์ "โฮสต์" ในกล่อง ชื่อไฟล์ แล้วบันทึกไฟล์ลงในเดสก์ท็อป

บนเมนู ไฟล์ ให้เลือก บันทึกเป็น พิมพ์ "โฮสต์" ในกล่อง ชื่อไฟล์ แล้วบันทึกไฟล์ลงในเดสก์ท็อป

4. เลือก เริ่มต้น > เรียกใช้ พิมพ์ %WinDir%\System32\Drivers\Etc แล้วเลือก ตกลง

5. เลือกไฟล์ โฮสต์ และเปลี่ยนชื่อเป็น "Hosts.old"

6. คัดลอกหรือย้ายไฟล์โฮสต์ที่คุณสร้างในขั้นตอนที่ 3 ไปยังโฟลเดอร์ %WinDir%\System32\Drivers\Etc ถ้าคุณได้รับพร้อมท์ให้ใส่รหัสผ่านของผู้ดูแลระบบ ให้เลือก ดําเนินการต่อ

ข้อมูลเพิ่มเติม

การสนับสนุนสําหรับ Windows XP สิ้นสุดลงแล้ว

Microsoft ยุติการสนับสนุนสําหรับ Windows XP เมื่อวันที่ 8 เมษายน 2014 การเปลี่ยนแปลงนี้มีผลต่อการอัปเดตซอฟต์แวร์และตัวเลือกความปลอดภัยของคุณ เรียนรู้ว่าสิ่งนี้มีความหมายอย่างไรสําหรับคุณและวิธีการปกป้องอย่างต่อเนื่อง

การสนับสนุนสําหรับ Windows Server 2003 สิ้นสุดลงในวันที่ 14 กรกฎาคม 2015

Microsoft ยุติการสนับสนุนสําหรับ Windows Server 2003 ในวันที่ 14 กรกฎาคม 2015 การเปลี่ยนแปลงนี้มีผลต่อการอัปเดตซอฟต์แวร์และตัวเลือกความปลอดภัยของคุณ เรียนรู้ว่าสิ่งนี้มีความหมายอย่างไรสําหรับคุณและวิธีการปกป้องอย่างต่อเนื่อง

ต้องการความช่วยเหลือเพิ่มเติมหรือไม่

ต้องการตัวเลือกเพิ่มเติมหรือไม่

สํารวจสิทธิประโยชน์ของการสมัครใช้งาน เรียกดูหลักสูตรการฝึกอบรม เรียนรู้วิธีการรักษาความปลอดภัยอุปกรณ์ของคุณ และอื่นๆ

ชุมชนช่วยให้คุณถามและตอบคําถาม ให้คําติชม และรับฟังจากผู้เชี่ยวชาญที่มีความรู้มากมาย

ข้อมูลนี้เป็นประโยชน์หรือไม่

คุณพึงพอใจกับคุณภาพภาษาเพียงใด
สิ่งที่ส่งผลต่อประสบการณ์ใช้งานของคุณ
เมื่อกดส่ง คำติชมของคุณจะถูกใช้เพื่อปรับปรุงผลิตภัณฑ์และบริการของ Microsoft ผู้ดูแลระบบ IT ของคุณจะสามารถรวบรวมข้อมูลนี้ได้ นโยบายความเป็นส่วนตัว

ขอบคุณสำหรับคำติชมของคุณ!

×