Loading ...

How to modify etc hosts in Ubuntu | CodeAsp.Net

How to modify etc hosts in Ubuntu

 /5
0 (0votes)

Open Terminal

Type "sudo -i gedit /etc/hosts".

That will open the hosts file:

Let's say you want to add "yoursite.com" to your local machine then you can add the following line at the last of that file:

127.0.0.1 yoursite.com

You can save the file and close it. Ping that site to confirm that etc/hosts file modification worked:

ping yoursite.com

 

Comments (no comments yet)

Top Posts