Est. reading time: 1 minutes
Edit hostfile on Windows or Mac

Edit Hostfile Windows/Mac


To edit the host file on a Windows system, you can use the following steps:

  1. Open the Start menu and search for “Notepad”
  2. Right-click on Notepad and select “Run as administrator”
  3. In Notepad, go to File > Open and navigate to the folder C:\Windows\System32\drivers\etc
    notepad screenshot
  4. Select “All Files” from the drop-down menu in the bottom right corner of the open dialog
  5. Open the “hosts” file
  6. Make your desired changes to the file, then save the file by going to File > Save


On a Mac or Linux system, you will need to use the Terminal to open and edit the host file.

  1. Open terminal
  2. Type “sudo nano /etc/hosts” and press enter
  3. Type in your admin password when prompted
  4. Make your desired changes to the file
  5. Save the file by pressing “CTRL+O”, then exit by pressing “CTRL+X”

Please note that editing the host file can cause connectivity issues if not done correctly, so it is important to be careful when making changes and to keep a backup copy of the original file.

Related posts