Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 30 Oct 2010 22:07:30 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Tim Dunphy <bluethundr@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: hostname
Message-ID:  <20101030220730.e929f9b1.freebsd@edvax.de>
In-Reply-To: <AANLkTi=LzD4iehPf7EV_PGfFFdQujMEi0BAzxp%2BVozro@mail.gmail.com>
References:  <AANLkTi=LzD4iehPf7EV_PGfFFdQujMEi0BAzxp%2BVozro@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 30 Oct 2010 16:00:39 -0400, Tim Dunphy <bluethundr@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, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20101030220730.e929f9b1.freebsd>