1

The terminal on my Ubuntu 17.10 didn't have any text colors, So I found a solution and got it fixed in .bashrc, so now my terminal have text colors. But the problem is every time I open a new tab in terminal, i need to run this command source ~/.bashrc to get the colors working. Is there a way that I can avoid running this command all the time?

Zhenyu
  • 249
  • @NerdOfCode answer solved my issue. I wonder why people suggested useing .bashrc in this post https://askubuntu.com/questions/517677/how-to-get-a-colored-bash – Zhenyu Mar 16 '18 at 15:13

2 Answers2

1

Don't use .bashrc, use .profile instead. .bashrc is not guaranteed to run on interactive shell.

1

Method 1

If this is a problem all users are facing in your system... Perhaps consider adding it to /etc/profile as this runs each time a user is logged in???

Method 2

If you do not want to use that method you can simply add something like source ~/.bashrc to the bottom of the /etc/profile for it to automatically do this...

But anyways... Either method should fix your problem...

NerdOfCode
  • 2,498