My terminal prompt on OS X 10.8.3 suddenly is not the machine or hostname anymore but something like:
minint-j4lfb2s:~
Where does that come from? I did not change it. How can that be?
My terminal prompt on OS X 10.8.3 suddenly is not the machine or hostname anymore but something like:
minint-j4lfb2s:~
Where does that come from? I did not change it. How can that be?
I've seen this happen on a few macs (including my own once), where the mac's "Computer Name"/"Local Hostname" gets corrupted.
Check System Preferences -> Sharing, and seem what the "Computer Name" text box. Then check the text under that to see if the "Local Hostname" is correct; if not, click the "Edit..." button to it's right.
The hostname can also be determined by a reverse DNS lookup (see this thread).
You can set a static hostname with sudo scutil --set HostName newname. It adds or changes the System:System:Hostname key in /Library/Preferences/SystemConfiguration/preferences.plist. Another way is to add HOSTNAME=newname to /etc/hostconfig.
Related questions: