1. Show current hostname
hostname
2. Edit `/etc/rc.conf`
vim /etc/rc.conf
And modify the hostname
hostname="new-freebsd-hostname"
3. Edit `/etc/hosts`
vim /etc/hosts
and add new hostname mapping
::1 new-freebsd-hostname
127.0.0.1 new-freebsd-hostname
-EOF-