chibi style
    

Home > Debian > 基本設定 > /etc/hostsの編集

/etc/hostsの編集

/etc/hostsを編集することによって、限られた空間内での名前解決を行うことが可能となる。

# vi /etc/hosts
127.0.0.1       localhost.localdomain   localhost       sarge

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
↓
127.0.0.1       localhost.localdomain   localhost       magi
192.168.1.11    magi   chibi.name	←追加。このマシンの情報
192.168.1.50    caspar		←追加。LAN内のもう1台のマシンの情報
サーバマシンのホスト名は、magiとしている

# The following lines are desirable for IPv6 capable hosts
#::1     ip6-localhost ip6-loopback
#fe00::0 ip6-localnet
#ff00::0 ip6-mcastprefix
#ff02::1 ip6-allnodes
#ff02::2 ip6-allrouters
#ff02::3 ip6-allhosts
IPv6用の記述は全てコメントアウトしておく


以上で、もし192.168.1.50のマシンにアクセスしたい時は、192.168.1.50とIPアドレスを指定してもいいし
casparと入力してもOK。



>>このページのTOPへ

最終更新 : 09/26/2005


Copyright © 2004-2007 chibi ,All Rights Reserved