Add colors to your bash shell

Unix shell is one of the most powerful tools ever created, but sometimes it can be quite dull. Adding it a bit more spice could make your day brighter and your thoughts clearer.

This can be done by setting the LS_COLORS environment variable. Best way to do it is in ~/.bash_profile file. If done like this, color settings will be loaded each time you start your terminal.

There are a lot of predefined configurations that you can use to set color scheme for your shell. One of most extensive ones is hosted on github: https://github.com/trapd00r/LS_COLORS

In addition to instructions that readme file on this repository provides, you should also:

  • use ~/.bash_profile instead of ~/.bashrs if it doesn’t work on your machine
  • add another line in ~/.bash_profile
    alias ls='ls --color=auto'

Once you set it up, your terminal will look like this.

Happy typing!

Recent Posts

Sonata Admin: modify validation groups in an admin extension

SonataAdminBundle has a powerful extensions feature which allows you to add or change features of…

4 years ago

Grandfather’s advices

I used to spend a lot of time with my grandparents in my childhood. My…

5 years ago

World. World never stops changing.

If anything is certain in this world, it is that things always change. And there…

5 years ago

How to be successful

This is the most important advice on how to be successful! Read it carefully!

8 years ago

I wanted to change WordPress URL, you won’t believe what happened afterwards

WordPress has a nasty habit of storing absolute URLs in the database. That means that…

9 years ago

Let’s Encrypt – providing free automated SSL certificates

In August 2014 Google announced that their search engine will value HTTPS as a ranking…

9 years ago