ماهو ملف Hosts؟ وكيفية أستخدامه في حجب المواقع والاعلانات

استعادة ملف Hoste الاصلي لكل اصدارات الويندوز مع طريقة التعديل عليه



تعريف ملف hosts وتبيان دوره وشرح طرق التعديل عليه وكيفية ارجاعه الى الوضع الافتراضي في كل اصدارات الويندوز


ما هو ملف hosts .؟

ملف hosts هو ملف بدون امتداد و هو من الملفات الاساسية في اشتغال و السير العادي للويندوز يستخدمه أي نظام لتشغيل (android linux mac windows ) لتعيين أسماء المضيفين المعتادة إلى عناوين بروتوكول إنترنت(IP) رقمية التي تقوم بتعريف وتحديد موقع المضيف في شبكة اتصال Ip .
 

ما هو دور ملف hosts .؟


يلعب ملف hosts دورا اساسيا في اشتغال الويندوز و تصفح الانترنت و زيارة المواقع المختلفة فيمكن القول انه الوسيط بين ما نكتب من عناوين للمواقع على متصفحات الانترنت و بين السيرفرات التي تشتغل عليها تلك المواقع فمثلا عند الرغبة فإجراء بحث على google ستكتب على متصفحك www .google.com و تضغط على موافق فتفتح الصفحة لاكن ما حدث هو انك لما قمت بضغط على موافق قام المتصفح بعرض الامر على ملف hosts الذي بدوره حوله الىIP موقع Google والذي هو كالتالي : ‏172.217.0.132‏ ليتم التحقق من وجوده وبالتالي فتحه , يمكن القول انا العناوين التي نكتبها حروفا تتحول الى ارقام في النظام عن طريق ملف الهوس تس ليتمكن من ربط الاتصال بها وبالتالي عرضها عليك كما يمكنك التعديل عليه لمنع تصفح بعض المواقع
على حاسوبك او منع برامج محددة من الاتصال بسيرفراتها ومنعها من التحديث اذا كانت مفعلة بكراك او مفتاح مزور مثلا
 

كيفية التعديل على hosts .؟

لتعديل على ملف الهوستس توجد عدة طرق لاكن الاسهل في اعتقادي هي عن طريق Notepad++ , اذا كيف نقوم بذلك وجب التذكير بضرورة أخد نسخة احتياطية من ملف hosts الاصلي و الاحتفاظ بها لضرورة .
المسار الطبيعي لملف hosts هو : C:\Windows\System32\drivers\etc
ما سنفعله الان هو القيام بمنع تصفح وتشغيل موقع معين على حاسوبنا في خطوة اولى سنتوجه الى مصار تواجد ملف 

hosts وذلك بتوجه وفق التسلسل التالي :
ندخل على ملف Windows ومنه نفتح system32 وبعد ذلك drivers ومن تم نفتح ملف باسم etc. و الذي سنجد
 

بداخله ملف hosts .




نقوم بنسخه ولصقه في مكان نختاره خراج مساره الاصلي وليكن سطح المكتب مثلا .
الان نقوم بنقرة مزدوجة على الملف واختيار فتحه Notepad++



الان بعد فتحه نأتي مباشرة تحث أخر سطر و نقوم بربط عنوان الموقع المراد حظره على جهازنا بما يسمى local host
ليصبح على الشكل التالي :
127.0.0.1 www.اسم الموقع .com

و بعد الانتهاء نقوم بالنقر على حفظ.
وبعد دالك نقوم بنسخه ولصقه في مسار تواجد الملف الاصلي مع الموافقة على الاستبدال نعيد تشغيل الجهاز اذا لزم الامر و مبروك تم التخلص من المواقع المزعجة .
مــــلاحــــظـــــــة : يمكن التعديل على ملف hosts في غياب برنامج Notepad++
بواسطة Notepad أو bloc-notes باتباع نفس الطريقة فقط عند النقرة المزدوجة على ملف hosts نختار فتحه ب bloc-notes والتعديل عليه وعند الحفظ وجب الانتباه الى الامر التالي :
كون ملف hosts ليس له اي امتداد وما يتم حفظه من على bloc-notes يكون بصيغة او بامتداد Txt. وجب اتباع الطرقة التالية : ننقر على Fichier ومنها نختار enregistrer sous .


نسمي الملف الجديد hosts بدون اي امتداد وذلك بكتابة الاسم بهذا الشكل ‏"‏‎ hosts ‎‏"‏


الان يمكننا نسخه و لصقه في مسار الملف و بالتالي نكون قد منعنا فتح المواقع الغير مرغوب بها على حواسيبنا الشخصية بدون اي برامج ولا اي شيء فقط باستخدام ملف hosts .
طــريــقــة ارجـــاع مــلـف hosts الى حـالــتـه الـطـبـيـعـيـــة . ؟
لإرجاع ملف الهوس تس الى حالته الاصلية لن نحتاج أي برامج كل ما علينا هو نسخ ملف hosts الموافق لإصدار الويندوز المثبت لدينا ولصقه على المفكرة وحفظه باسم "hosts"
ومن تم لصقه في مسار الملف الاصلي .

C:\Windows\System32\drivers\etc

مع الموافقة على الاستبدال .

ملف hosts ويندوز 10 (hosts Windows 10 )

قم بنسخ النص التالي، ثم قم بلصق النص في الملف

# 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




ملف hosts ويندوز 8 (hosts windowd 8)

قم بنسخ النص التالي، ثم قم بلصق النص في الملف :

# 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

ملف hosts بالنسبة لنظام التشغيل 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 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
# localhost name resolution is handle within DNS itself.
# 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



                                                    

لا تنسى مشاركة الموضوع فضلا وليس أمرا .

تعليقات



    حجم الخط
    +
    16
    -
    تباعد السطور
    +
    2
    -