Fix Font Colors In Windows 10 Bash

Below are steps you can take to improve your experience of using the BASH shell in windows 10. This tutorial's content is taken from Medium - Fixing dark blue colors on Windows 10 Ubuntu bash, but I felt the need to "redo" the post to fix issues with the commands/steps not working because the characters like apostrophes and semicolons are substituted to other characters due to Medium's steps to prevent code injection attacks. You should be able to copy/past the text/commands from this post without issue.

Fixing Folder Colors

By default, the colours in windows 10 BASH shell are so terrible it's pretty hard to read the folder names. To fix this append the following two lines to your $HOME/.bashrc file.

export LS_COLORS

Adjusting the Prompt

If you don't like having the full path of where you are (e.g. the output of pwd) in your prompt, then you can fix this by appending the following line to your $HOME/.bashrc file.

PS1='\e[37;1m\u@\e[35m\W\e[0m\$ '
After performing the steps above, BASH in windows will look something like below: ## Fixing VIM Colors Also, the default colors in VIM make it near impossible to read comments. You can fix this by executing the following command:
echo "set background=dark" >> .vimrc

The result will be that editing your .bashrc file in vim now will look like below:



Stuart is a software developer with a passion for Linux and open source projects.

comments powered by Disqus
We are a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for us to earn fees by linking to and affiliated sites. More info.