hostname

Polytropon freebsd at edvax.de
Sat Oct 30 20:07:33 UTC 2010


On Sat, 30 Oct 2010 16:00:39 -0400, Tim Dunphy <bluethundr at gmail.com> 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.

Put this setting into /etc/rc.conf:

	hostname="blah.foo.bar"

Of course with your desired hostname. :-)

See "man rc.conf" and "man hosts" for details about the function
of those files; see also /etc/defaults/rc.conf for other options
that may be interesting in this concern.


-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...


More information about the freebsd-questions mailing list