3
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?
3
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?
0
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.
"Computer name" and hostname - both present and correct. Hostname equals computer name plus ".local". – Joe D – 2013-05-30T13:42:50.717
0
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:
I have had the same issue today. What was the reason in your case? I am also freaked out a little, since I am afraid someone might have obtained an access to my mac – Ahmedov – 2017-11-10T14:18:28.677
I am sure there are ways to set a hostname. Right now I am just scared and wonder how it happend. And where this cryptic name comes from - where is it defined. E.g. the key in the preferences.plist you mention is correct - it shows the same as in the System preferences. – Joe D – 2013-05-30T19:49:46.893
What does your
sudo nano /private/etc/hosts
says? – mirkobrankovic – 2013-05-30T13:24:51.203Never touched that. It has the default entries I guess - (127.0.0.1 localhost, 255.255.255.255 broadcast, ::1 localhost, fe80::1%lo0 localhost) – Joe D – 2013-05-30T13:39:25.790
Figured out now, that it always happens when I am sitting in the office (of my new client). Is that a nt-domain thing? Is that normal? Back home everthing is fine again. – Joe D – 2013-06-05T07:47:45.400