1. Ubuntu: /etc/hostname CentOS: /etc/sysconfig/newwork 2. /etc/hosts 127.0.0.1 localhost.localdomain localhost anothername 3.启用:hostname newname