第一
vim /etc/sysconfig/network
HOSTNAME=frgdb_guanwang
第二
hostname frgdb_guanwang && export HOSTNAME=frgdb_guanwang
#把有HOSTNAME关键字的那整行替换了
sed -i '/HOSTNAME/ s/.*/HOSTNAME=notuse/g' /etc/sysconfig/network && hostname notuse &&export HOSTNAME=notuse
以下为针对gentoo
localhost ~ #vim /etc/conf.d/hostname
hostname=”evanpc”
localhost ~ #hostname evanpc
localhost ~ #export HOSTNAME=frgdb_guanwang
要先exit 然后再login就行了
ServerIndexno=3,
/bin/sed -i ‘/ServerIndex/ s/.*/ServerIndex=’${ServerIndexno}’/’ World.txt