hostnamectl
hostname --查看主机名称
----------------------------------------
vim /etc/hosts
127.0.0.1 localhost
127.0.1.1 ubuntu
172.19.25.91 slave1
172.19.25.92 slave2
172.19.20.76 registry.fpi-inc.hz
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
网友评论