networking - Adding host name to /etc/hosts in Linux -


question: there easy way add dhcp issued ip address , hostname of linux machine in /etc/hosts @ system startup automatically?

background: linux machine has hostname in /etc/hostname , won't resolve when ping. manually added hostname , ip address in /etc/hosts 1 network related java programs work.

thanks,

dhcpcd has -c/--script option run external script anytime configures or brings interface. can use manually update hosts file configured hostname.


Comments

Popular posts from this blog

python - Why doesn't list have safe "get" method like dictionary? -

razor - Is this a bug in WebMatrix PageData? -

sql server - Stored procedure -