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?
-
@NerdOfCode answer solved my issue. I wonder why people suggested useing .bashrc in this post askubuntu.com/questions/517677/how-to-get-a-colored-bash– ZhenyuMar 16, 2018 at 15:13
2 Answers
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...
Don't use .bashrc
, use .profile
instead. .bashrc
is not guaranteed to run on interactive shell.