On Sat, 30 Oct 2010, Tim Kellers wrote:

On 10/30/10 4:00 PM, Tim Dunphy wrote:
how can I set the hostname so that it persists through reboots? I have
set the hostname I want in /etc/hosts but rebooting the change does
not show up. In CentOS you have /etc/hostname which serves this
purpose but in FreeBSD I don't know how to do this.


thanks

edit /etc/rc.conf and enter:

hostname="[put your hostname here]"

change the [put your hostname here] to your actual hostname.

And it will load the name on (re)boot.

If you don't want to wait for reboot, you can set it immediately by typing

  hostname putyourhostnamehere

as root, substituting your desired host name for putyourhostnamehere. Also see `man hostname`. Note, this is *in addition to* editing rc.conf. The hostname command sets the hostname right now, and rc.conf makes it happen on each boot.

--
Chris Hill               [email protected]
**                     [ Busy Expunging <|> ]
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[email protected]"

Reply via email to