Windows 10 - Éditer le fichier hôtes

Windows 10 - Modifier le fichier des hôtes

Dans ce didacticiel, nous vous montrerons comment ajouter un mappage d'adresses IP aux noms d'hôte dans le fichier Hosts Windows.

Windows Hosts file
C: \ Windows \ System32 \ drivers \ etc \ hosts

1. Bloc-notes - Exécuter en tant qu'administrateur

Dans le bureau, dans la zone de recherche en bas à gauche, tapez notepad, cliquez avec le bouton droit sur l'icône du bloc-notes et sélectionnezrun as administrator.

windows-edit-host

2. Modifier les hôtes

2.1 In Notepad (make sure run as administrator), locate and open the following file :

C:\Windows\System32\drivers\etc\hosts

windows-edit-host-1

P.S In the open file dialog, select “All Files (.)”

2.2 Add a mapping of IP address to host name.

C:\Windows\System32\drivers\etc\hosts

# Copyright (c) 1993-2009 Microsoft Corp.
#
#...

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

#add this new line
45.56.65.145 linode-hydra

3. Essaye-le

Dans l'invite de commande, ping linode-hydra, il renverra maintenant 45.56.65.145

Invite de commande

C:\Users\example>ping linode-hydra

Pinging linode-hydra [45.56.65.145] with 32 bytes of data:
Reply from 45.56.65.145: bytes=32 time=276ms TTL=51
Reply from 45.56.65.145: bytes=32 time=278ms TTL=51
Reply from 45.56.65.145: bytes=32 time=279ms TTL=51

Ping statistics for 45.56.65.145:
    Packets: Sent = 3, Received = 3, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 276ms, Maximum = 279ms, Average = 277ms