修改文件

# vi  /etc/hosts

添加地址和别名

192.168.222.126  s1   ##前面是机器ip,后面是别名

测试

[root@bogon /]# ping s1
PING s1 (192.168.222.126) 56(84) bytes of data.
64 bytes from s1 (192.168.222.126): icmp_seq=1 ttl=64 time=0.204 ms
64 bytes from s1 (192.168.222.126): icmp_seq=2 ttl=64 time=0.955 ms
64 bytes from s1 (192.168.222.126): icmp_seq=3 ttl=64 time=0.882 ms
64 bytes from s1 (192.168.222.126): icmp_seq=4 ttl=64 time=0.583 ms

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2021-12-04
  • 2021-12-04
  • 2021-12-04
  • 2021-08-28
猜你喜欢
  • 2021-12-19
  • 2022-12-23
  • 2021-05-06
  • 2021-07-20
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
相关资源
相似解决方案