Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

[live][root@server ~]#

or

[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

1 Answer 1

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 at 8:40

Your Answer

 
discard

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.