# ifconfig hme0 unplumb # 停用 # ifconfig hme0 plumb # 啟用
# ifconfig hme0 inet 192.168.1.1 netmask 255.255.255.0 up
# vi /etc/defaultrouter 192.168.1.254
# echo "myhost" > /etc/nodename
# echo "domain domain.com" > /etc/resolv.conf # echo "nameserver 218.218.218.218" >> /etc/resolv.conf
# vi /etc/nsswitch.conf # 修改 hosts 行為: hosts: files dns
生效方式: 修改配置文件後重啟網絡服務或重啟系統;ifconfig 命令行設置為臨時生效,重啟失效。