Ask Different is a question and answer site for power users of Apple hardware and software. Join them; it only takes a minute:

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

For three days straight, I have connected to the public WiFi network at my local library. Each day, I have seen a different prompt in Terminal. Here are some of the prompts I've seen:

zp-pc:~ russell$
mary-pc:~ russell$
normob05:~ russell$

I have check under System Preferences -> Sharing, and my computer name is "Russell's Mac". Also, I set the DHCP Client ID to "RUSSMAC" under System Preferences -> Network -> Advanced -> TCP/IP, but I still see the random host names at the Terminal prompt.

Why is my computer name changing every day?

share|improve this question
See also… – rogerdpack Dec 19 '14 at 17:31

Type in Terminal:

scutil --get HostName

If there's no HostName available, what you see is probably coming from the DNS or DHCP server.

Set your HostName with:

sudo scutil --set HostName 'yourHostName'

That should do it.

share|improve this answer
Thanks! This fixes an annoyance with my company's VPN, and unlike Pulse Secure's KB article your solution works on OS X 10.11. – Robert Calhoun Apr 6 at 13:42
up vote 7 down vote accepted

Found the answer here, though there is some discussion about the details.

In short, the Mac will pick up a host name from the DHCP server. This does not affect your computer's name as you have assigned it. This will only affect what you see at the command prompt.

share|improve this answer
It's a short discussion of this exact issue. The conclusion is that you're seeing a name that was given to you by the computer that assigned you an ip address. In other words, the library's wifi gave me a random name that it picked up from some other computer that previously connected to their wifi. – Russell Thackston Dec 14 '14 at 1:58
what was the "answer" mentioned then? Just that it's benign to go ahead and ignore? – rogerdpack Dec 14 '14 at 7:02
Correct. BTW, the link is working now. It looks like klanomath fixed it. – Russell Thackston Dec 17 '14 at 12:31

This is very late, but hopefully this helps those in the future who run into this problem. After a lot of research the somewhat long but most simple answer I found was to:

  1. Open System Preferences > Network
  2. Click the location dropdown menu
  3. Select "Edit Locations..."
  4. Click the plus button to add a new location
  5. Add a new location by giving it a name
  6. Click Done
  7. Click Apply (instructing it to use the new location)
  8. Open new Terminal window

That should do it.

share|improve this answer
should do what? – cvogt Jun 4 '15 at 22:21

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.