How to configure hosts in Mac OS


There are times when you need to change hosts when testing services on the development server, etc.

In Windows, there is a file called hosts in C:\WINDOWS\system32\drivers\etc\, and in Mac, there is a file called hosts in /private/etc.

Here's how to edit the hosts file on Mac.

1. Run Terminal on Mac

2. Open the hosts file. The hosts file is read-only, so open it with superuser privileges

sudo vi /private/etc/hosts

If you have specified an administrator password, enter the password.

3. Add ip and domain name to be added in vi editor and save

If you come to the bottom line and press esc-i, a line is added and you are in append mode. After entering or pasting the ip and domain name, save and exit with esc-:wq







Recommendations





0 If you like the article, please click the heart~ It will be a strength to bloggers (SNS/login/advertising is not related)



Articles you might like







Push-Up Star: Push-Up Counter

Automatic push-up measurement and voice count, various types of push-up measurement and push-up speed analysis, police officers, military fitness test, military academy, student health fitness assessment (POPs), etc. automatically calculated












One Comment

Add a Comment

Email addresses are not disclosed. Required items *is indicated by

























This posting is part of Coupang Partners' activities, and a certain amount of commission is provided accordingly.