Situatie
Solutie
Hosts File Location
But where is the Hosts file on our Mac located, and how do we edit it? The Hosts file on a Mac is found in the /etc/hosts folder. To edit the file, follow the steps below.
1. Launch the macOS Terminal application.
2. Go to the Finder, then Click Go.
3. Click Utilities.
4. Double-click Terminal to launch the Terminal window.
5. Now, enter the following command: sudo nano /etc/hosts
6. Then, enter the sudo password for your user to allow edit access to the file.
7. Next, use the arrow keys to move the cursor to the bottom of the file. On a new line, enter the testing server’s IP address and the domain name you want to use for that IP address. (In the example below, we used the IP address 123.123.123.123 and the domain name mydomain.com)
8. Next, press Control+O to overwrite the existing file, then press Enter to confirm the overwriting. This saves the changes to the file.
9. Now, press Control+X to exit the nano editor.
10. Finally, to update our browsers DNS records and make these changes go live in your browser, enter the following command: sudo killall -HUP mDNSResponder.
Leave A Comment?