Update host-name.rst

please don't manually edit /etc/hosts
This commit is contained in:
bri 2023-01-13 14:36:58 -05:00 committed by GitHub
parent 4f08e26f3d
commit 2d9c613f01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 <hostname> inet <address>
Create a static hostname mapping which will always resolve the name