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

Colored Command Prompt
Colored Command Prompt

By default settings, elementary OS command prompt is black in color in the Terminal window, which is 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 of installing a third-party tool. In this tip, I’m going to edit the bashrc file to change to colored Command Prompt. This is 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 simply 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

Hi there! I’m Kiran Kumar, founder of FOSSLinux.com. I’m an avid Linux lover, and enjoys hands-on with new promising distros. Currently, I’m using Linux Mint as a daily driver and run several other distros such as Fedora, Solus, Ubuntu, Debian, and some new ones on my test PC and virtual machines. I have a day job as an Engineer, and this website is one of my favorite past time activities especially during Winter ;). When I’m not writing for FOSSLinux, I’m seen biking and hiking on scenic trails. Hope you enjoy using this website as much as I do writing for it. Feedback from readers is something that inspires me to do more, and spread my love for Linux. If you find time, drop me an email or feedback from ‘Contact’ page. Or simply leave a comment below if you found this article useful. Have a good day!

Leave a Reply

Be the First to Comment!

Notify of
avatar
wpDiscuz