nobody user in terminal What's nobody phrase in Terminal (and iTerm)?


It sometimes changes to my Mac name. But why is it nobody and how to prevent it?
nobody is probably the hostname your system gets from a DHCP server. This also explains why sometimes you see the name you set yourself.

Check out Why is my host name wrong at the Terminal prompt when connected to a public WiFi network?