Steps for Editing the Hosts File on Mac

Step 1: Open the Terminal of the Mac operating system & execute the following command. 

*Note: You may also be asked to enter the MacBook password.

Command: sudo nano /etc/hosts

 

Step 2: A new editor will be opened in the next window which allows user to make any changes. The IP Address along with the Domain Name will be inserted into the editor. Right after that, click Enter to save the changes.

 

Hence, we have successfully edited the host file in the Mac operating system.

How to Edit Your Hosts File on Windows, Mac, or Linux

Oftentimes, it becomes a necessary task to edit the host file in Windows, Mac, and Linux operating systems. The host file might be changed by some malicious attack on your machine or sometimes you need to get control access to some websites, then you should make some changes in the host file. In this article, we will go through some easy steps that will help to edit Mac, Linux, and Windows host files.

Similar Reads

Steps for Editing the Hosts File on Windows

Prerequisite – How to Show Hidden Files and Folders in Windows 10...

Steps for Editing the Hosts File on Mac

Step 1: Open the Terminal of the Mac operating system & execute the following command....

Steps for Editing the Hosts File on Linux

Step 1: Open the Terminal in the Linux operating system & run the following command....