hosts

Last-modified: 2015-04-09 (木) 02:32:58

hosts

コマンド

  • なし

hostnameコマンド

hostname xxxx

これにより一時的にホスト名を変更できる。
再起動などを行うと無効になる。
ホスト名設定の詳細については、ホスト名設定ページ?設定ページを参照ください。

環境設定ファイル

  • /etc/hosts

    (Ubuntu 14.10 /etc/hostsの例)
    127.0.0.1	localhost
    127.0.1.1	mcgguest-virtual-machine
# 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

機能

設定例

127.0.0.1	localhost
127.0.1.1	mcgguest-virtual-machine
# 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
192.168.11.7 PukiWiki
192.168.11.10 PukiWikiNY2400S