MacOS – Weird Output in terminal

macosterminal

I am using the terminal for some debugging and I noticed that it has stopped displaying my user before the path. Now its displaying (null) like so:

(null):mspgcc-examples dean$

Whats changed? As i've changed no configuration to change it. Viewing the shell variable $PS1 I get the following results:

(null):mspgcc-examples dean$ echo $PS1
\h:\W \u\$
(null):mspgcc-examples dean$ 

Best Answer

You can read through the thread on Apple Discussion Group for details. The most important that some routers doesn't like computer names which can't be part of valid DNS name (English letters, numbers, dashes, underscores).

To name my Mac I use something like Eir-Mac or EirMac and have no problems.

Related Question