how to edit the host file in MAC OS X

Editing the hostfile in MAC OS X is an easier task.

Step 1

Go to Applications > Utilities > Terminal.

Step 2

Open the hosts by typing on the terminal, here is the command.

” sudo nano /private/etc/hosts ”

Type your Username and password and then Ok.

Step 3

The host contains some comments,the lines are starting with the # symbol.You can navigate the file using the arrow keys.

Step 4

Sfter editing the hostfile, Press Cntrl + o to save this file.

For Exit Press Control + X.

Note : For immediate effect,Flush the DNS Cache.

Add comment

Your Header Sidebar area is currently empty. Hurry up and add some widgets.