6

I have a situation in which sometimes when I launch Terminal instead of showing:

computername:~ user$

It instead shows:

192:~ user$

I've already found that the questions OS X computer name not matching what shows on terminal and Machine name set to new-host-X instead of the name set in Preferences are both very closely related to mine. However the solutions placed the origin of the 'problem' at using Xcode or a double internet connection (Wi-Fi + wired).

I have Xcode installed but haven't used it for quite some time. Also, I'm only using a Wi-Fi connection.

So, what could cause Terminal to sometimes display my computername correctly and sometimes only display 192 instead of it?

Montmons
  • 388
  • i think the listing of your computer name is set in the .bash_profile file. Is it possible that .bash_profile had not been run when you get the 192? – Natsfan Oct 26 '17 at 17:24
  • Hmm.. didn't know that .bash_profile was related. How can I check if it ran? Just looked at the contents of the file, in my case it only holds export PATH=/usr/local/bin:$PATH which is apparently put there by Homebrew (At least I guess since the comment #Homebrew is written the line above it). – Montmons Oct 26 '17 at 17:28
  • Sounds like it's NOT used. I'm obviously wrong about that. Sorry. I'll keep looking though. – Natsfan Oct 26 '17 at 17:35
  • Have you set your computer name in system preferences/sharing? I've read that can contribute to your problem. – Natsfan Oct 26 '17 at 17:45
  • Both of the answers you found apply to your case -- it has nothing to do with Xcode or double connections. The solutions are the same: either ignore it (because it doesn't actually matter), or use sudo scutil --set HostName computernamegoeshere to override the bogus into the DNS server is handing out. – Gordon Davisson Oct 26 '17 at 18:24

0 Answers0