Setting a permanent host name in Mac OS X
Are you tired of host names like eliza-7.local in Mac OS X? Are you tied of seeing pointless dialogs like “eliza-7.local is already in use. Switching to eliza-8.local”? Do you want a stable hostname you put in scripts, MYSQL user tables, and so forth? If so add the following line to /etc/hostconfig
:
HOSTNAME=eliza.elharo.com
Of course you’ll change eliza.elharo.com to the fully qualified domain name of your machine. You’ll need to use sudo
to edit the file. On versions of Mac OS X prior to Tiger (10.3 and earlier) you may need to delete the existing HOSTNAME
line as well.
It’s up to you whether or not to register the name with your local DNS server, though I find it convenient to do so. One more trick: it’s completely possible to register NAT addresses like 192.168.254.23 with external DNS servers like EasyDNS. You’ll only be able to connect to that system from within your local subnet (unless you’ve configured your firewall to forward external requests to that local address), but the DNS resolution still works.
November 29th, 2005 at 4:18 PM
[…] The latest problem I’ve noticed comes on this site when the post is not long enough to match the sidebar. For example, take a look at Links Matter. The Google ads end up below the text instead of to the right as they should. Or the Mac category page where both the Feed list and the ads disappear below the text. That is the “column” shifts left as soon as possible. […]