Terminal: something that I do not understand

Discussion in 'Mac Basics and Help' started by Koreos, Mar 26, 2009.

  1. Koreos macrumors member

    Joined:
    Mar 4, 2008
    #1
    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.
     

    Attached Files:

  2. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
    #2
    That's the name of your computer. You can change it in the Sharing preference pane.
     
  3. Koreos thread starter macrumors member

    Joined:
    Mar 4, 2008
    #3
    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...
     
  4. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #4
    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> "
     
  5. BlueRevolution macrumors 603

    BlueRevolution

    Joined:
    Jul 26, 2004
    Location:
    Montreal, QC
  6. belvdr macrumors 603

    Joined:
    Aug 15, 2005
    #6
    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.
     
  7. Koreos thread starter macrumors member

    Joined:
    Mar 4, 2008
    #7
    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
     
  8. Makosuke macrumors 603

    Joined:
    Aug 15, 2001
    Location:
    The Cool Part of CA, USA
    #8
    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.
     

Share This Page