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.

  • You should have Googled first... The option is in the "Sharing" pane in system preferences. The technical name is "host name". – billc.cn 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
  • 1
    See superuser.com/questions/295832/… – sgmoore Oct 3 '11 at 18:36

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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