_J Blog

学んだ事のまとめやメモなどが中心です

/etc/hosts に設定を書いたときの確認と反映

/etc/hosts は書いて保存したら自動的に反映にされるようですね。
例えばhostsに

127.0.0.1 hogehoge.com

と書いたとき、その確認をnslookupでやったらダメだった。

nslookup hogehoge.com
> ;; connection timed out; no servers could be reached

pingでやったら大丈夫でした。

ping hogehoge.com
> 64 bytes from 127.0.0.1: icmp_seq=0 ttl=64 time=0.054 ms
> 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.136 ms

当たり前のネタでごめんなさい。