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?
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)> "
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.