MacBook Pro identifying itself strangely in Terminal and Apache

1

In Terminal my bash prompt is

unknown-00-26-bb-16-08-a0:~ simon$

When I switch Web Sharing on, I am presented with the following URL as the location of the site served from my machine:

http://unknown-00-26-bb-16-08-a0.home/~simon/

Can anyone help me identify why this is happening?

I am running OS X 10.6 on a MacBook Pro.

Many thanks

simon

Posted 2009-12-10T19:58:32.573

Reputation:

The name is probably being included in your DHCP server's response. You might look there (probably your Internet router) to see if there is an option to assign a name for your MAC address. – Chris Johnsen – 2009-12-10T22:27:24.800

Answers

2

You can change/check your local hostname by going to System Preferences and opening the Sharing Preference Pane. Mac OS X uses the local hostname over the host name. (echo $HOSTNAME will show the local hostname)

You'll want to click the Edit... button near the top of the window under where it says your Computer Name. You can then set your local hostname. The other method is via the command line:

sudo scutil --set LocalHostName simon

Chealion

Posted 2009-12-10T19:58:32.573

Reputation: 22 932

Doesn't work for me. My computer's hostname is Steves-MacBook-Air.local, but appears in DHCP as unknown1040f388c48c. – Distortum – 2012-06-16T05:00:46.440

As it turns out, I broke the 16 character limit. When I changed the hostname to Steves-Mac, it worked. – Distortum – 2012-06-16T05:32:28.850