My WSL terminal lost color

Thijs picture Thijs · Feb 13, 2018 · Viewed 10.9k times · Source

For some reason when I start the Ubuntu terminal in Windows, it doesn't show colors until I type bash. What could be the reason and how do I fix it? When I installed WSL it always showed colors.

enter image description here

Answer

Akash Mahapatra picture Akash Mahapatra · Aug 30, 2018

The reason could be a modified .bash_profile file. Try putting these lines to ~/.bash_profile

source ~/.bashrc

Or a better way is to run the below command from your terminal

echo "source ~/.bashrc" >> ~/.bash_profile

To know more about how do we set environment-variables and what role do files like .bashrc, .bash_profile play, you may want to read: