Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

On a Mac the hostname and prompt is:

workstation:~ thomas$

On Ubuntu Linux it would be:


How can I make the OS X prompt look like the Ubuntu one?

share|improve this question
The word you were looking for is "prompt", and you'll probably find a lot more information now, when doing a search for it ;) – slhck Jun 29 '12 at 7:45
up vote 4 down vote accepted

Just run this command in terminal

PS1="[\u@\h:\w]$ "


  • u represents username
  • h represents hostname
  • w represents current working directory

This is temporary, that means after running this command if you close the terminal again, the default prompt will appear.

If you want to set permanently, then insert below line in your .bash_profile file under your home directory:

export PS1="[\u@\h:\w]$ "
share|improve this answer
You forgot the colon :, and the syntax in OS X is the same, since it also uses bash. – slhck Jun 29 '12 at 7:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.