Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I bought a late 2009 Mac Mini recently, updated it to Lion, and was rather frustrated to find that even after changing the Bonjour, DNS, and local network name, the terminal prompt (and "Computer ID" in Directory Utility) still shows joshuas-iphone. There has never been a Joshua nor an iPhone that has ever connected to my network, so I've ruled that out. Any help would be HIGHLY appreciated.

share|improve this question
You should have Googled first... The option is in the "Sharing" pane in system preferences. The technical name is "host name". – Sep 30 '11 at 1:36
I've already tried that...Everywhere but the Terminal prompt, the computer name/host name is "Mac Mini." – Matt Sep 30 '11 at 17:58
See… – sgmoore Oct 3 '11 at 18:36
up vote 2 down vote accepted

The Terminal app does a DNS look up to get the hostname to display at the prompt. It is essentially meaningless. Your hostname is what you set in the Sharing Preferences, regardless of what you see in Terminal. The DNS record is wrong and is returning what it thinks is the hostname for the IP of your Mac.

If it bothers your that much you should check your DNS config on your home router or reset it to flush the DNS records.

Alternatively you could change the login script to get the hostname from another source, my favorite is with "networksetup -getcomputername". This pulls it from the systems configuration, not DNS.

share|improve this answer
  1. Open System Preferences and click on Sharing.
  2. In the textbox labelled Computer Name: change it to whatever you want.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.