LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices


Old

Keeping /etc/hosts up to date (dhcp)

Posted 02-28-2021 at 04:30 AM by Ninguém (Anybody's business)
Updated 03-02-2021 at 03: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 149 Comments 0 Ninguém is offline

  



All times are GMT -5. The time now is 03:07 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