0

I'm trying to make my console gorgeous with setting custom dircolors. For that I'm doing

eval $(dircolors "dircolors.ansi.dark")

where dircolors.ansi.dark is my custom file with preffered colors.

Everything works good, except tty (you know it's console without graphical interface. You can call it with pressing CTRL+ALT+F2, F3, etc.

Inside that console I don't have colors for ls command, and if I check echo $LS_COLORS it's empty.

How to set LS_COLORS there?

0

Your dircolors.ansi.dark file probably does not include the appropriate terminal type identifier for the text-mode console, causing the dircolors command to do nothing when run on a console session.

Go to the console, login and type echo $TERM. You'll get the name of the terminal type, usually it's linux when on the console but it might be something different depending on your distribution and its configuration.

Then, make sure your dircolors.ansi.dark file includes a TERM line that matches the terminal type used on the console. There may be several TERM lines, and they may include wildcards. See dircolors --print-database | less for an example.

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.