0

I am on OSX, and my host name in the preferences panel reads "User's Computer Name" but when I go to my command line it is reading:

something else:~ myusername$

My understanding is the first part of the terminal prompt is always the machine name, however every indication from the GUI's on OSX seem to be that my machine name is different than what is displayed in the terminal.

What could cause the terminal first part to be different?

When I echo $PS1 I get:

\h:\W \u\$

If I check my hostname I get:

scutil --get HostName
HostName: not set

I have also tried the netbios name:

defaults read /Library/Preferences/SystemConfiguration/com.apple.smb.server NetBIOSName

steves-machine

and the local host name

 scutil --get HostName
    steves-machine
stevebot
  • 1,721

1 Answers1

1

In the terminal you get the HostName, and that could be different than your ComputerName:

You can see both values by issuing the following commands:

scutil --get ComputerName
scutil --get HostName

Reference: http://osxdaily.com/2012/10/24/set-the-hostname-computer-name-and-bonjour-name-separately-in-os-x/

Vlad
  • 798