Linux-Noob Forums
edit hosts to point ip to www addy - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: Tips and Tricks (https://www.linux-noob.com/forums/forum-59.html)
+--- Thread: edit hosts to point ip to www addy (/thread-4044.html)



edit hosts to point ip to www addy - Guest - 2003-12-12


to edit your hosts file to point an ip (eg: 100.0.0.1) to a www address (eg: www.linux-noob.com) do this

 

su -

 

vi /etc/hosts

 

press INSERT on your keyboard

 

change it from

 

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

 

 

to

 

# Do not remove the following line, or various programs

# that require network functionality will fail.

127.0.0.1 localhost.localdomain localhost

100.0.0.1 www.linux-noob.com linux-noob

 

press ESCape on your keyboard

 

write the changes with

 

:wq

 

thats it

 

now when you type [/url][url=https://www.linux-noob.com]https://www.linux-noob.com (or whatever it was) you won't get the ip address or host not found, you'll get the www address :-)

\

cool

 

cheers