Where does terminal color scheme in 17.3 come from?

Forum rules
Before you post please read how to get help
Post Reply
pccobbler
Level 1
Level 1
Posts: 10
Joined: Sun Jan 08, 2017 11:44 am

Where does terminal color scheme in 17.3 come from?

Post by pccobbler » Sat Dec 09, 2017 5:33 pm

In 18 and later, I can comment-out the 30 or so lines following "uncomment for a colored prompt" to eliminate the avocado green color in a terminal. But in 17.3, there is no .bashrc file. Where does 17.3 get its color scheme from? I assume there's a .bashrc in a system directory that users use, but where is that?

rene
Level 7
Level 7
Posts: 1724
Joined: Sun Mar 27, 2016 6:58 pm

Re: Where does terminal color scheme in 17.3 come from?

Post by rene » Sat Dec 09, 2017 6:37 pm

The defaults are actually internal to the program dircolors and can be viewed with dircolors -p. To customize per user resp. system wide do

Code: Select all

dircolors -p >~/.dir_colors
resp.

Code: Select all

dircolors -p | sudo tee /etc/DIR_COLORS
and edit the created file. The global /etc/bash.bashrc uses it through on startup eval $(dircolors -b ~/.dir_colors) or same with /etc/DIR_COLORS if ~/.dir_colors does not exist; you can do as well so to test changes immediately without the need to restart bash.

pccobbler
Level 1
Level 1
Posts: 10
Joined: Sun Jan 08, 2017 11:44 am

Re: Where does terminal color scheme in 17.3 come from?

Post by pccobbler » Sat Dec 09, 2017 8:02 pm

Verrrrrry interesting, lots of things to play with in that file. Thanks!

Post Reply

Return to “Scripts & Bash”