When do changes to the hosts file become active?

If I make a change to the hosts file, is it immediately referenced by the system, or is there some sort of reloading process? (For example, do I need to exit and log back in? Do I need to shut down and restart the Linode?)

1 Reply

If you're talking about changes to the /etc/hosts file, they should take effect immediately — any services that rely on this file for name resolution should see the changes as soon as they're written to the file.

If you're talking about updating your hostname, such as with a service like hostnamectl, then you'll have to reset your network connection before you see those changes take effect.

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct