Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

As a linux user, I spend a lot of time mucking about in bash. I've always been a bit frustrated by how poor the readability is.

Today this annoyed me enough to spur me into action. My immediate problem was solved by this snippet, which changes the directories colour to magenta. (Annoyingly, this caused me to lose all the other ls colours.)

So I started wondering, what other tweaks exists to make bash a bit more readable?

share|improve this question

migrated from serverfault.com Nov 21 '11 at 14:26

This question came from our site for system and network administrators.

closed as not constructive by Michael Mrozek Nov 21 '11 at 16:39

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

Maybe better on SuperUser? That aside, get a decent font for starters. Look for a font with a line height ~120% (0.2 of a line gap), makes it much more readable. In Gnome Terminal go to Edit->Profiles to change that stuff, I'm sure there's an equivalent in most other terminals but I mainly work with the Gnome one – sam Nov 21 '11 at 14:08
The readability is what you set it to be. Nothing to get frustrated about, just configure to your liking. – rozcietrzewiacz Nov 21 '11 at 14:47
@rozcietrzewiacz That's kinda the point of my question. I'm not blaming bash. I want to know how people have configured it to their liking. – Tom Wright Nov 21 '11 at 15:28
If you come up with a specific attribute you want to change we can go with that, but "what stuff do you do to make bash readable" is massively broad – Michael Mrozek Nov 21 '11 at 16:39
up vote 6 down vote accepted

Maybe Solarized? http://ethanschoonover.com/solarized

There's a bunch of projects that do similar terminal colorization schemes with an eye to usability.

share|improve this answer
Nice find! I'm going to try this. – ewwhite Nov 21 '11 at 14:25
Works really nicely with PuTTY. +1 – Tom Wright Nov 21 '11 at 15:42

The other colors in ls output were gone, because the blog post you refer to gives really poor instructions. If you set LS_COLORS to 'di=0;35', then you've just instructed ls to color only directories. Remove that setting from your .bashrc, re-login in another terminal and do

echo "$LS_COLORS"

You'll probably see a long set of color settings. Here's what I have:


The useful property of that variable is that if you define a color more than once, the last setting will override any previous. So if you just want to change the color for displaying directories to magenta, do

export LS_COLORS="${LS_COLORS%:}:di=01;35:"

(A colon is used to separate settings.)

share|improve this answer

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