LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Keeping /etc/hosts up to date (dhcp)

Posted 02-28-2021 at 05:30 AM by Ninguém (Anybody's business)
Updated 03-02-2021 at 04:28 AM by Ninguém
Tags incomplete

When you get your IP address using DHCP in a domain your /etc/hosts file, as well as /etc/networks might get out of sync with reality.
If I plug my laptop to the wifi network at the library, for example, my /etc/hosts has a line like the following one:
Code:
192.168.0.10 myhost.example.com myhost
Where, in fact, it should be something like:
Code:
192.168.13.100 myhost.ourlibrary.org myhost
The same thing happens to /etc/networks where a line like the following one should be...
LQ Newbie
Posted in Questions
Views 99 Comments 0 Ninguém is offline

  



All times are GMT -5. The time now is 01:03 PM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration