Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Koreos

macrumors member
Original poster
Mar 4, 2008
56
0
Hello everyone,

I am a student, and I was doing some c++. I compile and debug my projects in terminal. Today, when I opened the terminal application, something weird that I do not understand happened (attached screenshot).

Why does it say "erica" at the very beginning of the command line? I do not think it has ever said it before...

I am a little bit concerned, but more curious than anything.

Thank you.
 

Attachments

  • terminal.gif
    terminal.gif
    19.2 KB · Views: 86
That's the name of your computer. You can change it in the Sharing preference pane.

hmm.. I set the name of my computer when I bought it and it definitely is not erica. Unless it's been changed without my permission. But it still is the correct name under the Sharing preference pane...
 
If you do,
Code:
set | grep "PS1"
it'll show what your command line prompt is set to. I have mine set to ':\w> ' but that isn't the default. If you want to change the prompt you can add the following line to your .profile file (located in your home directory, though may not be there by default) then restart Terminal.
Code:
export PS1=":\w> "
 
Most likely it is a reverse DNS issue. If you obtained the address 10.1.1.1 on network #1, and 10.1.1.1 reverse resolves to host1, then Terminal will show host1, regardless of what the name of your system is.

If you obtained the same address from network #2, and 10.1.1.1 reverse resolves to pc1, then Terminal will show 'pc1' at the prompt.
 
Most likely it is a reverse DNS issue. If you obtained the address 10.1.1.1 on network #1, and 10.1.1.1 reverse resolves to host1, then Terminal will show host1, regardless of what the name of your system is.

If you obtained the same address from network #2, and 10.1.1.1 reverse resolves to pc1, then Terminal will show 'pc1' at the prompt.

I think that might be the cause, as I am using the campus' internet...
Even though I do not understand the mechanics of that process, I can see what you are saying.

Thanks, hopefully once I go back home it will go back to normal
 
Almost certainly the reverse DNS issue described by belvdr; I once had this happen to me and was completely baffled as to how the command prompt on a friend's computer would be showing the name of my home machine despite never having any direct contact with it. I eventually figured out it had pulled it from the network somehow, and while I also don't pretend to understand the exact mechanics, if you're on a campus network I'd bet it's what's happening to you.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.