Windows 10 –ホストファイルの編集
このチュートリアルでは、IPアドレスのマッピングをWindows Hostsファイルのホスト名に追加する方法を示します。
Windows Hosts file
C:\ Windows \ System32 \ drivers \ etc \ hosts
1. メモ帳-管理者として実行
デスクトップの左下の検索ボックスに「メモ帳」と入力し、メモ帳アイコンを右クリックして、run as administratorを選択します。
2. ホストを編集する
2.1 In Notepad (make sure run as administrator), locate and open the following file :
C:\Windows\System32\drivers\etc\hosts
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. 試して
コマンドプロンプトでlinode-hydraにpingを実行すると、45.56.65.145が返されます。
コマンド・プロンプト
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