mac系统下配置域名映射关系

1.cd /private/etc/

先修改权限:sudo chmod 777 hosts

vi hosts

localhost:etc mhx$ cat hosts

##

# Host Database

#

# localhost is used to configure the loopback interface

# when the system is booting.  Do not change this entry.

##

127.0.0.1 localhost

255.255.255.255 broadcasthost

 

192.168.1.104   admin-pc

 

::1             localhost 

 

添加ip及对应的域名即可

posted @ 2017-08-16 10:49  mhx_pyw  阅读(1422)  评论(0编辑  收藏  举报