Force the Hostname on OS X?

Is there anyway to “force” the hostname on OS X?

My box is typically name “wdr1-maclt”, but when I do things, such as login into a hotspot, it gets a name like “40.0.253.in-addr.arpa” assigned.

I have my .bashrc setup to dynamically source files based on the hostname, so this fucks up quite a few things.

4 Responses to “Force the Hostname on OS X?”

  1. benjamin Garrett Says:

    I think that it always will respond to .local which is the rendezvous/bonjour host name for the computer.

    Like our blog server is otaku.local on the internal network and furyandfrost.com externally.

  2. Bill Says:

    Any way to get hostname to return that?

  3. Kevin Says:

    Edit /etc/hostconfig and change

    HOSTNAME=-AUTOMATIC-

    to

    HOSTNAME=wdr1-maclt

    or whatever you like

  4. Bill Says:

    Kevin, you rock! Thanks!

Leave a Reply