LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   /etc/hosts permanent changes? (http://www.linuxquestions.org/questions/linux-networking-3/etc-hosts-permanent-changes-341956/)

kpachopoulos 07-10-2005 04:56 PM

/etc/hosts permanent changes?
 
How can i achieve permanent changes of /etc/hosts? I found that i can do "chattr +i /etc/hosts", but i think this is a solution of necessity. Is there another way to add a host?
There was another similar thread and the answer was "edit /etc/hostname"; there is no such filename however.
What can i do?
Thanks

keefaz 07-10-2005 05:03 PM

What do you want to do ? resolve known host names to their IPs ?
If yes, it is not hard, add the hosts in /etc/hosts as :
Code:

127.0.0.1  localhost
10.0.0.1    nocturna
10.0.0.2    futura
64.179.4.149  www.linuxquestions.org

Why do you need to chattr it ?


All times are GMT -5. The time now is 10:00 AM.