主页 > 经验 >
苹果Macbook怎么编辑hosts文件 苹果Macbook编辑hosts文件方法
苹果Macbook怎么编辑hosts文件 苹果Macbook编辑hosts文件方法 在Windows上修改Host是一件很简单的事情,但是换成Mac系统,很多用户就发懵了。而我们修改Hosts主要是为了可以推翻 DNS 和更改 URL与IP 地址,对于一般Mac使用者来说没什么必要修改Hosts文件,对于需要深入了解深入探讨MacBook的你来说,可能就需要修改Mac上的Hosts文档了。跟小编一起看看“Mac上修改Hosts两种方法”。
苹果Macbook怎么编辑hosts文件 Mac上修改Hosts两种方法详解
方法一:
1、首先开启一个文件夹,点击上方【前往】->【前往文件夹】。

2、输入“/private/etc/hosts ”,点击【前往】。

3、自动开启“etc”文件夹,找到【hosts文件】,并将其拉到桌面上,也就是复制一份hosts文件到桌面上,这样才能修改桌面上的hosts文件。

4、“右键”桌面上hosts文件,选择【打开文件的应用程序】,使用【文字编辑】开启。

5、下面就可以开启编辑hosts文件。

6、编辑完后就可以把桌面上的hosts文件拉回到“/private/etc文件夹中 ”,会弹出询问框点击“确认”,并“取代”即可。

方法二:
1、在桌面左上角点击【放大镜】来“搜索”,输入“终”或者是“term”就会显示“终端机”,然后开启它。

2、开启后输入“sudo vi /private/etc/hosts ”,并按下“Enter键”跳出要求你输入管理者密码,这个密码:就是开机时登入OS X时输入的密码,输入后直接按下“Enter键”即可,如果没有设定管理者密码用户开启的时候就输入“vi /private/etc/hosts ”,肯恩贵出现权限不足的问题。

3、打开后就进入编辑器,可移动最后一行,按下键盘上的“o”键,会跳转到下一行的输入状态。这样就可以开始编辑hosts文件了。

4、编辑好hosts文件,按下键盘“Esc”按键,输入“:wq ”将会自动保存,就可以结束编辑器。

5、这样一来就编辑完了hosts文件。

苹果Macbook怎么编辑hosts文件 Mac上修改Hosts两种方法详解
方法一:
1、首先开启一个文件夹,点击上方【前往】->【前往文件夹】。

2、输入“/private/etc/hosts ”,点击【前往】。

3、自动开启“etc”文件夹,找到【hosts文件】,并将其拉到桌面上,也就是复制一份hosts文件到桌面上,这样才能修改桌面上的hosts文件。

4、“右键”桌面上hosts文件,选择【打开文件的应用程序】,使用【文字编辑】开启。

5、下面就可以开启编辑hosts文件。

6、编辑完后就可以把桌面上的hosts文件拉回到“/private/etc文件夹中 ”,会弹出询问框点击“确认”,并“取代”即可。

方法二:
1、在桌面左上角点击【放大镜】来“搜索”,输入“终”或者是“term”就会显示“终端机”,然后开启它。

2、开启后输入“sudo vi /private/etc/hosts ”,并按下“Enter键”跳出要求你输入管理者密码,这个密码:就是开机时登入OS X时输入的密码,输入后直接按下“Enter键”即可,如果没有设定管理者密码用户开启的时候就输入“vi /private/etc/hosts ”,肯恩贵出现权限不足的问题。

3、打开后就进入编辑器,可移动最后一行,按下键盘上的“o”键,会跳转到下一行的输入状态。这样就可以开始编辑hosts文件了。

4、编辑好hosts文件,按下键盘“Esc”按键,输入“:wq ”将会自动保存,就可以结束编辑器。

5、这样一来就编辑完了hosts文件。

- 最近发表
- 赞助商链接