How to activate or enable color themes in bash scripts or other languages in Nano editor

Bored of looking at that black and white text for a while? You would want to enable or activate color themes in Nano editor which is really easy to do.

There are many languages supported for color theming within nano, such as

  • C/C++
  • PHP
  • Ruby
  • SH
  • CSS
  • Man
  • Perl
  • Python
  • TCL
  • HTML


First you will want to open nanorc file with the command shown

Then you would want to find include file that holds theming information such as one shown below

Mostly what you have to do is to uncomment this line so above will become this

You can edit this file too, open one of the file in edit mode with nano

You will get something like this



You can change above mentioned colors to your taste for different things such as keywords, strings etc. icolor is case in-sensitve matching for the provided pattern.

For more information on nanorc files, you should check out this link

I activated colors for bash scripts, Text within my bash scripts under nano looks like this now


I hope that this article will be helpful to you. leave your comments if you would like to share any additional information.





Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.