Article 5ENWJ keep /etc/hosts up to date (dhcp)

keep /etc/hosts up to date (dhcp)

by
Ninguém
from LinuxQuestions.org on (#5ENWJ)
I notice /etc/hosts has a line with current IP address and hostname and possible domain just after localhost.
Code:127.0.0.1 localhost localhost.localdomain
192.168.1.22 myhost myhost.example.comHow do you keep it correct when getting its IP address from DHCP (since it changes)?
I'm using debian, by the way.latest?d=yIl2AUoC8zA latest?i=DPr_y7M_wbw:hY7LOrK1-40:F7zBnMy latest?i=DPr_y7M_wbw:hY7LOrK1-40:V_sGLiP latest?d=qj6IDK7rITs latest?i=DPr_y7M_wbw:hY7LOrK1-40:gIN9vFwDPr_y7M_wbw
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments