1

Well, I was just wondering if it is okay for the OS X shell to display something like this:

192-168-1-7:~ name$ 

What does the above actually mean? I have tried setting my host name but still didn't work!

And the Terminal window is name is name--- bash ---80x24 What does that mean?

Thank you

  • Isn't that where the shell would normally put the name of the computer? Maybe it did not figure out a computer name, so it used the IP address as a default. – GEdgar Aug 14 '16 at 0:45
  • bash is the name of the shell being used. 80x24 means the terminal is set to 24 lines of 80 characters each. – GEdgar Aug 14 '16 at 0:46
  • Type echo $PS1 as well as uname -n and post the output. – Allan Aug 14 '16 at 0:46
1

The bash interactive shell prompt - if not tweeked further - is determined by the PS1-line in the file /etc/bashrc.

The 6th line PS1='\h:\W \u\$ ' decodes to

  • \h the hostname up to the first `.' - in your case 192-168-1-7
  • : delimiter
  • \W the basename of the current working directory, with $HOME abbreviated with a tilde - in your case ~ which is equivalent to the directory /Users/name/
  • delimiter/space
  • \u short user name of the current user - in your case name
  • $ UserID-identifier (it turns to a # if the effective UID is 0 (~root) - else $)
  • delimiter/space

A longer list of possible customizations of the prompt (e.g. time, date, bell) will be shown after opening Terminal.app, entering man bash and going down to PROMPTING.


The Terminal window title shows your working directory, the name of your shell (bash - GNU Bourne-Again SHell) and its size: 80 characters x 24 lines.


Your fully qualified host name is probably 192-168-1-7.SLD.TLD (e.g. 192-168-1-7.dlink.home) and is assigned by a DHCP server in your network. Considering all that your Terminal window name and the embedded shell prompt is completely regular.

You must log in to answer this question.

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