1

This question already has an answer here:

I have recently been in terminal and somehow I lost my Mac name. It's showing a strange IP followed by some numbers. My computer's name is "my-xxx-macbook-pro." When I type hostname I receive:

ip-10-xx-xx-xxx.us-west-2.compute.internal

I have been working in AWS a lot to try to develop some products.

How do I get back to my computer in terminal?

marked as duplicate by Mark, Allan, fsb, nohillside terminal Nov 29 '18 at 18:45

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 1
    Thanks @Allan for keeping me honest! :) I've retracted the close vote. – Monomeeth Jun 2 '17 at 1:12
  • We seem to have multiple questions that could be duplicates, should probably decide on one best one. – JMY1000 Nov 29 '18 at 17:16
1

Somewhere, whether it be in a virtual network created in AWS or your company's own network, you are being assigned a hostname through a DHCP server (and possibly in conjunction with a RADIUS server).

Looking at the format of the assigned name, it's too specific (us-west-2.compute.internal), and the IP address and domain both point to internal networks.

You can manually set your hostname with the command:

sudo scutil --set HostName "YourHostName"

However, when you reboot, it will revert back to whatever has been assigned to you. Your best bet is to check with your network manager.

  • Sorry, I am new to this but this is my personal laptop and this is on my home network. There is no network manager. Is there a way to log out and log into my Mac? Is there a way to prevent this from happening? – Marv Freed Jun 2 '17 at 19:50

Not the answer you're looking for? Browse other questions tagged .