Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Whenever I connect to production server using ssh from my terminal, is there any way to automatically change the appearance of the Ubuntu terminal with special color so that I don't execute some stupid commands thinking that I am running in my local system?

share|improve this question
add comment

2 Answers

Best way would be to reverse the prompt, so it is easily seen, that you're on a different system:

 PS1="$(tput rev)$LOGNAME@$(uname -n)>$(tput sgr0)> "
share|improve this answer
add comment

If you're using Gnome Terminal, you can create different profiles for different purposes using File->New Profile.... Each profile can have their own terminal title, custom command, colors, background and other settings.

share|improve this answer
add comment

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.