站点图标 神之眼的博客

MacOS 修改hosts文件

當前文章的短網址連結為: https://unos.top/ifa1

打开终端

sudo vim /etc/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
::1             localhost
# Added by Docker Desktop
# To allow the same kube context to work on the host and the container:
127.0.0.1 kubernetes.docker.internal
# End of section
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
"/etc/hosts" [noeol] 13L, 364B

然后添加相应的配置即可!

退出移动版