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?

1

2 Answers 2

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...

2
  • I used Method 2, work like a charm.
    – Zhenyu
    Mar 16, 2018 at 14:55
  • @Zhenyu Glad I could help :)
    – NerdOfCode
    Mar 16, 2018 at 14:56
1

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

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .