From owner-freebsd-questions@FreeBSD.ORG Sat Oct 30 20:24:07 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7530F106566B for ; Sat, 30 Oct 2010 20:24:07 +0000 (UTC) (envelope-from chris@monochrome.org) Received: from mail.monochrome.org (b4.ebbed1.client.atlantech.net [209.190.235.180]) by mx1.freebsd.org (Postfix) with ESMTP id 2F5B68FC18 for ; Sat, 30 Oct 2010 20:24:06 +0000 (UTC) Received: from [192.168.1.11] ([192.168.1.11]) by mail.monochrome.org (8.14.3/8.14.3) with ESMTP id o9UKO6h5061691; Sat, 30 Oct 2010 16:24:06 -0400 (EDT) (envelope-from chris@monochrome.org) Date: Sat, 30 Oct 2010 16:24:06 -0400 (EDT) From: Chris Hill To: Tim Kellers In-Reply-To: <4CCC7B90.6090807@wallnet.com> Message-ID: References: <4CCC7B90.6090807@wallnet.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: Tim Dunphy , freebsd-questions@freebsd.org Subject: Re: hostname X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Oct 2010 20:24:07 -0000 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 chris@monochrome.org ** [ Busy Expunging <|> ]