Super User is a question and answer site for computer enthusiasts and power users. 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 work a lot in terminal on os x. I usually have two tabs opened - bash and svn on a remote server. Since files on my remote server are the same as on my disk it sometime get me confused.

Is there a chance of changing bash terminal color to ie. blue and leaving all ssh connection in another tab in black color? I mean permanently, not just via inspector for one session.

Thanks.

share|improve this question

migrated from stackoverflow.com Jan 28 '11 at 1:45

This question came from our site for professional and enthusiast programmers.

I´d suggest using different coloured Prompts for that, this site from IBM is a good starting point for info on that topic: http://www.ibm.com/developerworks/linux/library/l-tip-prompt/

I personally have the following line in my ~/.bash_profile:

export PS1='\[\e[44m\] \u @ \H | \[\e[7m\] $PWD \[\e[0m\] \n > \[\e[0m\] '

which not only colours my prompt blue, but also shows my current Hostname and which directory I´m currently in. If you have sufficient access to the other servers you use, you could give the prompt a different colour there.

share|improve this answer

Well, it is not what you are looking for, but just in case... I have two custom settings in the Terminal, one named "LOCAL" and another "SSH mymachinename", with completely different color settings (back/green, white/black) to help me know where I am.

I also changed the default Title of the tab/window for each setting, and on the SSH setting, in the "Shell" tab I put "ssh root@..." as a command to run on startup (I work almost exclusively on one remote machine, but you could duplicate this for more machines of course).

If you right-click the Terminal icon on the Dock you can directly open a Terminal with the appropriate settings for the session.

Also, I use Spaces (Desktops) and open the terminal for the SSH session on, say, Space 4, and the Local terminal on Space 3.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .