My Mac device name has been changed.

I started the terminal on my mac and I realized that now my computer has a name foreign to mine.

I'm the only one who use my MacBook. I've been trying to change my Mac's name and it's not possible. I need your help. Thank you so much.

MacBook Pro with Retina display, macOS Mojave (10.14.1)

Posted on Nov 10, 2018 1:27 PM

Reply
3 replies

Nov 10, 2018 5:19 PM in response to paredesug

The Terminal shell (usually bash) does a reverse DNS lookup on your IP address, and the host name is the result it got back. Depending on your network setup, the name may have come from your router, your DNS server, or a server on your ISPs network.


If changing the computer name didn't work after flushing the cache or a restart, you can also explicitly set the PS1 environment variable with the desired prompt in .bash_profile (a normally invisible configuration file).

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

My Mac device name has been changed.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.