DEV Community

loading...

Better colors for `ls` in dark terminals

fernand0 profile image Fernando Tricas García Updated on ・1 min read

I'm using a dark theme in my terms but ls --color shows a dark blue color for directories, that make it difficult to read. In How to Change Colors on LS in Bash
but I didn't want to mess with each color, I was looking for something like a 'schema', so I discovered dircolors and the [dircolors solarized][https://github.com/seebi/dircolors-solarized] repo.

Mainly, you can clone the repo git clone https://github.com/seebi/dircolors-solarized and then follow these instructions:

General Instructions

...

eval `dircolors /path/to/dircolorsdb`

To activate the theme for all future shell sessions, copy or link that file to ~/.dir_colors, and include the above command in your ~/.profile (for bash) or ~/.zshrc (for zsh).

You are going from this:

Alt Text

to this:

Alt Text

And some more things, of course. But this is all what I wanted. A small difference that will help me to see things again.

Discussion (0)

pic
Editor guide