Terminal has gone weird after screen sharing
I used screen sharing on my Macbook Pro to remote control my friend's iMac.
Unfortunately, now my Terminal now says:
kellys-iphone-2:~ James$
Why is it now saying this all of a sudden? Where has kellys-iphone-2
come from? Should I be worried?
Thanks.
The default prompt in Mac OS X is derived from System Preferences
-> Sharing
-> Computer Name
. If that is set correctly and you still see kellys-iphone
in new terminal prompts, your terminal environment variable PS1
has been set in either .bashrc
, .bash_profile
or some other local file.
You can check which files set PS1 like so: grep PS1 ~/.*
Side note: If you see a line like this:
[ -z "$PS1" ] && return
which just means "if this is not an interactive shell, disregard the rest of this file" - so that's not the droids you're looking for.
That should reveal a file that has a line akin to this:
export PS1="\u@\h\w$ "
Or, if I'm right:
export PS1="kellys-iphone-2:\w "
Edit that file/line to reflect what you really want. More info about custom prompts in OS X