0

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.

3
  • Do you know kelly? – Ruskes May 28 '13 at 12:02
  • Nope, not at all lol – Jamesking56 May 28 '13 at 13:09
  • Have you simply tried rebooting? – Nicholaz May 28 '13 at 13:49
1

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

12
  • What would it have been originally? – Jamesking56 May 28 '13 at 13:12
  • Also, .bash_profile and .bashrc don't have PS1 set at all... and grep hasn't helped me at all – Jamesking56 May 28 '13 at 13:14
  • Grep returned this: pastebin.com/KNf55ufV – Jamesking56 May 28 '13 at 13:14
  • What's the output from the following; uname -a; hostname; echo $PS1? – Jan May 28 '13 at 13:33
  • 2
    At work, our DHCP server will sometimes "recycle" old names for IPs. The "kellys-iphone-2" name is 99% certainly coming from somewhere similar. – Kent May 28 '13 at 23:30
0

First do not panic :)

If you want to change that just do flowing:

System preferences > Sharing >Edit

Here you will see the kellys-iphone-2

Just change it to what you like :) enter image description here

2
  • It doesn't say kellys-iphone-2... – Jamesking56 May 28 '13 at 18:36
  • And my Mac seems to have fixed itself 0_o – Jamesking56 May 28 '13 at 18:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .