Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

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

I would like to add _ENV to my bash so once I ssh to the server it shows something like this:

[live][root@server ~]#


[dev][root@server ~]#

How can I do this? I have been looking everywhere for this but without any luck.

Thank you!

share|improve this question
up vote 1 down vote accepted

Stick something like this at the end of your ~/.bashrc

export PS1='[live][\u@\h \w]# '

The dev/live is hard-coded in so you'll need to edit that unless you've got a method of picking that out.

You can also add a splash of colour to make it easier to notice.

export PS1='[\[\033[0;35m\]live\[\033[00m\]][\u@\h \w]# '
share|improve this answer
Thanks :) Helped me a lot :) – mYzk May 27 '14 at 8:40

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.