How to change the command prompt to colored in elementary OS terminal

By default settings, the elementary OS command prompt is black in color in the Terminal window, which is the same color as that of the command line which you type. This was done to avoid distraction and should be OK for most of us. But, in case you wanted a colored command prompt just like in Linux Mint, you can change it in no time and without the need to install a third-party tool. In this tip, I’m going to edit the bashrc file to change to colored Command Prompt. This is a very safe and completely reversible method.

Default Command Prompt
Default Command Prompt

STEP 1: Go to ‘Applications’ and launch ‘Terminal.’

STEP 2: Type the following command and hit enter.

gedit ~/.bashrc

STEP 3: In the bashrc gedit window, scroll down slightly and look for the following line:

# force_color_prompt=yes

Uncomment that line, which means you have to delete # in front of it. So finally it should be:

force_color_prompt=yes

Edit Bashrc and Uncomment force_color_prompt=yes
Edit Bashrc and Uncomment force_color_prompt=yes

STEP 4: Click ‘Save’ and close the terminal.

STEP 5: Launch ‘Terminal’ again, and you will see the colored command prompt.

Colored Command Prompt
Colored Command Prompt

Leave a comment

Your email address will not be published. Required fields are marked *