1834499 Members
2468 Online
110068 Solutions
New Discussion

/etc/hosts

 
SOLVED
Go to solution
muyallo1
Advisor

/etc/hosts

Hello Everybody

If i change the /etc/hosts file i need reboot the server?

Thanks for all your answers

Javi
5 REPLIES 5
Pete Randall
Outstanding Contributor
Solution

Re: /etc/hosts

No, the change takes effect immediately.


Pete

Pete
Ivan Krastev
Honored Contributor

Re: /etc/hosts

Reboot is not required.

See syntax of the file - http://docs.hp.com/en/B2355-60103/hosts.4.html

regards,
ivan
Oviwan
Honored Contributor

Re: /etc/hosts

you can add a new entry like:
192.168.1.222 anyhostname.domain.com anyhostname

then try to resolve the ip address:

$nslookup anyhostname

this works, hence you don't need to reboot your system.

Regards
Steven E. Protter
Exalted Contributor

Re: /etc/hosts

Shalom Javi,

This is not windows.

/etc/hosts is a configuration file to permit resolution of hostname to numeric ip address.

It may not be in use. Check /etc/nsswitch.conf and see if its set to be used at all.

hosts: files dns

This means that files (/etc/hosts) will be used first and then DNS.

In either context its not necessary to reboot the server.

If your change is not working, check nsswitch.conf You can post it if you wish.,

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
muyallo1
Advisor

Re: /etc/hosts

Kaitxo SEP

The file is cat /etc/nsswitch.compat
and i have this

hosts: nis [NOTFOUND=return] files

I modify the /etc/hosts and it`s solve

Thanks for all your answers

JAvi