Thursday, March 26, 2015

Set your Raspberry Pi shell prompt to another color

I've got two terminal windows open, one is on my local machine and the other is on my Raspberry Pi.  The problem I've got is that when I'm switching back and forth I sometimes forget if I'm in the correct window or not.  Here is what they look like:

They look exactly the same, save for the "pi@raspberrypi" prompt in one window vs. the other.

I want the Rpi to have a pink or red or raspberry (heh) or some other bright colored prompt.

Alter .bashrc with whatever editor you want.  I use vim, so from your home directory:

vim .bashrc

Look for these lines:

I want something sort of startling -- so I know I'm at the rpi prompt.

You can find a list of color codes here.

Here's what I changed:

Then do a "source .bashrc" when you're finished.

Pretty simple.  I'm not sure if I'm startled enough by it -- but it is a good start.

No comments:

Post a Comment