FreeBSD: change hostname permanently

To change FreeBSD’s server hostname:

To make it permanent, surviving reboot:

edit in file /etc/rc.conf
hostname="NEWNAME"

edit in file /etc/hosts
127.0.0.1 NEWNAME
::1       NEWNAME

Here is a SH script to download or fetch: hostname.sh

That’s it. No reboot is required.

Leave a Reply

Your email address will not be published. Required fields are marked *