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:

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!

Bash shell with different colors

By Aleksandar Jakovljević

My name is Aleksandar Jakovljević and I am a web developer from Belgrade, Serbia. I was born in Smederevo, in 1980. I started focusing on web development since late 2003. I am mostly focused on open source web technologies. I specialised in PHP, focusing on Symfony framework, with skills in Drupal and WordPress, too. I worked more than 7 years for art_net studio and 10 years for Computer Rock (former Spoiled Milk). Now I am working on developing industry leading subscription management system as a part of Plenigo team since August 2021. I love the web and everything related to it. The possibility to publish your ideas quickly and make them available to the entire world is what made me decide to pursue a career in web development.

Follow on: Twitter | GitHub | LinkedIn | Facebook | Instagram

Hire me on Upwork

Leave a comment

Your email address will not be published. Required fields are marked *

The reCAPTCHA verification period has expired. Please reload the page.