Server Fault is a question and answer site for system and network administrators. 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

Possible Duplicate:
How do you make it obvious you are on a production system?

I have several terminal windows open and would like to make the terminal session on the production server look very different from my local machine and staging servers to reduce the chance that I type something on the production server by mistake.

Does anybody have some tips for doing this?

Edit: Just want to clarify - I meant that I have many xterm sessions open and want to disambiguate between them. - Thanks!

share|improve this question

marked as duplicate by Michael Hampton, Ryan Ries, voretaq7 Dec 3 '12 at 21:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Please disambiguate what you mean by 'terminal'. Do you mean you have remote desktop connections to Windows boxes open. Or do you have many xterm sessions open with connection to *nix boxes. – Zoredache Dec 4 '09 at 23:44

If you are talking about remote desktop. I usually change the background or use BG Info so I can at a quick glance know which box I am on.

share|improve this answer
I originally meant a terminal with a command prompt, but thanks for the pointer too the tool. I'm gonna start using that as well. :) – ro. Dec 5 '09 at 4:36
cool tip though. I'll remember the BG Info if I ever have Windows servers. – neoice Dec 5 '09 at 5:38

change the colors of the prompt. I use this to distinguish between root and users, but you can easily color-code by host. (green for local, yellow for dev, red for production!)

here's a tutorial for bash:

YMMV if you use a different shell, but "$SHELL prompt color tutorial" should find it on Google.

share|improve this answer

Thanks for the suggestions everybody. I ended up taking the following approach:

I used byobu ( to configure GNU screen. I made screen start on login so that there will always be a red bar at the bottom of the terminal like this:

alt text

share|improve this answer
This is a good solution, it's effectively a variant on setting PS1 to something like PROD:{$HOSTNAME}# – voretaq7 Dec 3 '12 at 17:53

Here's a discussion with several options you can use as a starting point but no Holy Grail one true answer: How do I change the background color of xterm permanently?

share|improve this answer

One thing missing is changing your prompt! Using something like this:

root@missioncritical ~:

is subtle but might be enough of a reminder (in addition to the color schemes). As always, exercising caution and using the 'hostname' command are never a bad idea if you are doing something that could potentially break something anywhere.

share|improve this answer

Are you talking about Windows Terminal Server? If so, BgInfo will print unique info about your box right onto dekstop.

share|improve this answer

I'd recommend a combination of :

  • changing the color of the prompt


  • changing the content of the prompt (ex: add [critical] or a similar reminder, just before the end of you prompt)


  • some co-workers could be color blind
  • and when you save or log the session, the text itself would contain the new prompt's content (depending how you log or save the session, you could lose the color information)
share|improve this answer

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