From 2d9c613f01b78c5920d79b88b724fbca8c67eee4 Mon Sep 17 00:00:00 2001 From: bri <284789+b-@users.noreply.github.com> Date: Fri, 13 Jan 2023 14:36:58 -0500 Subject: Update host-name.rst please don't manually edit /etc/hosts --- docs/configuration/system/host-name.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/configuration/system/host-name.rst b/docs/configuration/system/host-name.rst index 6b3a075f..6915af15 100644 --- a/docs/configuration/system/host-name.rst +++ b/docs/configuration/system/host-name.rst @@ -49,6 +49,10 @@ This section shows how to statically map an IP address to a hostname for local (meaning on this VyOS instance) name resolution. This is the VyOS equivalent to `/etc/hosts` file entries. +.. note:: Do *not* manually edit `/etc/hosts`. This file will automatically be +regenerated on boot based on the settings in this section, which means you'll +lose all your manual edits. Instead, configure static host mappings, as follows. + .. cfgcmd:: set system static-host-mapping host-name inet
Create a static hostname mapping which will always resolve the name -- cgit v1.2.3