How to reload /etc/hosts file in AIX without reboot

aixhosts

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

Best Answer

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.