Strange terminal issue

Discussion in 'macOS' started by treycaliva, Jul 21, 2008.

  1. treycaliva macrumors newbie

    Jul 21, 2008
    I'm getting a very strange terminal problem. On my command-line, where you'd usually see "localhost:~" or your computer name, I'm getting "47:~".

    I've been playing around with a Ruby on Rails installation, do you think this would have anything to do with it?
  2. wrldwzrd89 macrumors G5


    Jun 6, 2003
    Solon, OH
    This is normal if your computer is connected to a public Wi-Fi network, for example. Your prompt in the Terminal will take on a new name instead of localhost. Certain kinds of servers can affect this too, if they're running on your computer and you're connected to them.
  3. cptpower macrumors regular


    Sep 10, 2007
    Calgary, AB
    its likely normal. If you check your environment settings in terminal, I'm willing to bet that the line for PS1 looks something like this:

    this expands to the following:

    hostname:basename of current working directory$

    unless you're signed in as somebody with UID 0 (i.e. root), then it'll be:

    hostname:basename of current working directory#

    All these can be found in the man page for the shell you're using (I checked both sh and bash, and they're in there), under the "prompting" section. Give it a read, and find ways to customize your prompt.. they can be made to look pretty cool, and there's lots of useful stuff that you can display on each prompt as well (like the date/time, username, etc).

    By the way, you can view your prompt setting by typing 'set' at the prompt, and look for the lines that say "PS1" through "PS4".

Share This Page