Enabling a color prompt in Linux

If you used a Raspberry Pi, where you probably run Raspian/Debian Linux, you’ll notice that is has a colorful prompt:


This shows who you are currently logged-in-as, and the computer name in green, then the directory where you are in blue. On a screen with grey-on-black text, it helps make the screen more readable.

You might be slightly annoyed that this isn’t enabled in many other Linux distributions. However, “enabled” is the keyword. For systems that default to using the bash shell, you should see a .bashrc file in your home directory – edit that:

$ nano ~./.bashrc

in that file, hopefully you see some sections at the end refering to “$color_prompt”, etc. If so, look just above there for:


and uncomment that (take away the hash sign). Voila, you now have that easy-to-read color prompt like you have on the Raspberry Pi.

If you don’t have a .bashrc or those default color settings, as a reference, here is the .bashrc from Raspian.

Posted in Computers and Internet, General, Infrastructure, Linux, Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 9 other followers

%d bloggers like this: