I was wondering if anyone could explain the meaning the command below in mac terminal:


Noticed it for the first time today and just wondering what it meant.


1 Answer 1


That line is called command prompt.

dhcp-74-148 is you hostname that you received from dhcp server.

~ is where you currently are (which directory) - tilda means you are in your home folder, /Users/[username]

: just separates hostname from current directory.

You can change format of command prompt by changing $PS1 variable. And - if you're interested - check out some bash shell tutorial for more information.

  • thanks for that answer. I"ll read more about the shell. I just noticed that command for the first time when I opened the terminal today-I've used the terminal before but it was a different command that was there. Still trying to figure out exactly what was there previously.
    – John_dydx
    Nov 17, 2014 at 15:07
  • You should be able to change it going to System Preferences > Sharing > Computer Name. It will also be name of your machine others will see if you will share some files or use AirDrop. Nov 17, 2014 at 15:09
  • As for changing the prompt - if - for example - you do export PS1='[\033[01;34m]\t [\033[01;32m]\u@\h [\033[01;34m]\w $[\033[00m]', you will have nice green/blue prompt with username and time :) Nov 17, 2014 at 15:11
  • Thanks so much-sry I don't have enough points to +ve rep you. Many thanks. I've figured what was there previously.
    – John_dydx
    Nov 17, 2014 at 15:15

You must log in to answer this question.

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