Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How to reload /etc/hosts file in AIX without reboot? I am trying to ping a new entry but it still shows previous version. Thanks

share|improve this question
You should probably update this with more information. Have you used nslookup or dig to test the dns lookup. What, exactly, are you pinging? Detail would help solve this. – Mark Jul 18 '11 at 18:15
Need more detail. Including some output. Are you running the ping from a session on the AIX machine, or are you running the ping from a client which is using the AIX machine for host lookups? – EightBitTony Jul 18 '11 at 19:40

Flush the netcd DNS cache:

netcdctrl -t dns -e hosts -f

Hostname lookup order is determined using /etc/irs.conf, /etc/netsvc.conf and then $NSORDER.

Keep in mind though, that irs.conf and $NSORDER are typically not used.

share|improve this answer
ipconfig doesn't work on AIX and you can't put order hosts,bind into an AIX resolv.conf. I assume you that you assume the original question was about a client of an AIX machine. – EightBitTony Jul 18 '11 at 19:40
@EightBitTony - thanks for calling me out on that. i did some research and changed my answer. thanks, i upvoted your comment. – djangofan Jul 19 '11 at 20:09

The hosts file change should be immediate. But AIX can be configured to look at DNS first and the hosts file second. Check the /etc/netsvc.conf file to see if "local" is listed first.

If you are running named on the server you may need to restart it for DNS lookups... but the hosts file isn't normally cached anywhere.

share|improve this answer
local is listed first. However still it does respect my new entries – Gok Demir Jul 18 '11 at 17:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.