分类: LINUX
2011-12-19 12:46:21
1. /etc/hostname: AMD(hostname)
2. /etc/hostname:
127.0.0.1
localhost
127.0.1.1
AMD.
AMD
# 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
debian 主机名主要是/etc/hostname这个文件,在里面直接写主机名
要开机显示主机名,/etc/init.d/下必须有hostname.sh脚本,在/etc/rcX.d中各运行级别里要加入hostname.sh的连接
可以用update-rc.d命令实现:
1.建立hostname.sh脚本