一 临时修改主机名 sell> hostname 新主机名 二 永久修改主机名 1.修改/etc/sysconfig/network中的hostname 2./etc/hosts中ip对应的主机名。这个是DNS解析用。