How to fix hosts file on Mac
File hosts on the system help users to intervene deeply into the computer, support users to change the system such as blocking ads from certain websites or software such as blocking ads on Viber, or blocking websites. browser, even support access to blocked websites, .
File hosts on all operating systems allow users to change, edit, add commands to meet the purpose we want to perform. To edit the hosts file on Mac, users also need to follow each step in the order as when editing the hosts file on Windows 10 or changing the hosts file on Linux. The following article will guide readers to change the hosts file on a Mac.
- 5 ways to block websites and limit usage time on Linux computers
- How to open the hosts file on Windows
- How to reset HOSTS files on Windows 7/8 / 8.1 and Windows 10
- How to create a new host file on Windows
Instructions to edit the hosts file for Mac
Method 1: Edit the hosts file on Mac via etc
Step 1:
First we press the key combination Command + Shift + G to display the directory access dialog. Next we enter / etc into the search field and click Go to continue.
Step 2:
Show etc folder with many files inside. Users browse to fie hosts and then double click to open and edit and save.
In case the hosts file does not save, we overwrite the content, the user moved that hosts file to the desktop or another directory to edit. Then copy to the etc directory to overwrite the existing hosts file.
Method 2: Edit the hosts file on the Mac via Terminal
For Mac OS, we have more ways to fix hosts file via Terminal.
Step 1:
Users access to Utilities folder and then click on Terminal in the list to launch. Or we press the keyboard shortcut Commnd + Space and then type the keyword Terminal to open up.
Step 2:
In the interface shown, enter the command sudo nano / private / etc / hosts and then type the password of the Mac into the Password line below. Click Return to open the hosts file.
Step 3:
Display the hosts file interface for users to edit. We use the left and right up and down arrows to move the cursor to where the content of the hosts file needs to be edited.
Step 3:
Once finished editing, we press Ctrl + X and then press Y to agree to save new content to the hosts file. Finally press Return to agree or press N to not save the content.
So we have 2 different ways to edit the hosts file, change the content of the hosts file on the Mac. If you edit the hosts file via etc, it is best to copy the file to another location for editing and then copy the etc folder again to overwrite the existing file.
I wish you successful implementation!
You should read it
- How to reset HOSTS file on Windows 7/8 / 8.1 and Windows 10
- How to modify and manage Hosts files on Linux
- How to block websites using hosts file
- Block the website by hosts files on Windows 8
- How to Edit the Hosts File on a Mac
- How to edit the Host file, how to edit the Host file, read and open the Host file
- Instructions to restore the hosts file on Windows to default
- Some tricks for hosts files in the system
- Edit Hosts file to access Facebook 2014
- How to fix the hosts file on Windows 10
- How to open the hosts file with Admin rights - Apply to open the file system
- How to open the Host file on Windows 10, edit the hosts file
Maybe you are interested
9 ways to fix the error of not being able to save files as JPEG or PNG in Photoshop
Download standard and beautiful Word file experience initiative cover template
How to use the file search command on Windows, find saved files
How to split sheet into multiple separate Excel files
How to merge PDF files, merge and join multiple PDF files into a single file
How to clean up iPhone junk, delete junk files to free up iPhone storage