Fix for random hostnames on Mac OS X

OS X assigns hostnames automatically by default. To do this it will often do a reverse DNS lookup for your IP address. If you connect and disconnect from DHCP networks often, you will find that your IP address changes frequently, resulting in your computer getting randomly assigned the hostname of another machine  on the network. Needless to say this can get pretty annoying. There’s an easy fix though.

Just edit /etc/hostconfig and add this line:
HOSTNAME=new_host_name
There’s a little more info here.
  1. No comments yet.

  1. No trackbacks yet.