Thursday, 11 September 2008

Spice up the command line with BashStyle-NG

What I like most about Linux is its powerful command line. Many people find it intimidating, but with a little practice, the command line is the most natural way of interacting with a computer. Things can be done with the command line in less time than it takes to just launch the equivalent GUI utility.

The term "command line" naturally doesn't invoke a very pleasant image because we have come to associate it with a bland, colourless screen filled with text. But in reality, things can't be more further from the truth. X based terminal utilities allow a variety of customizations to tweak the appearance to fit the user's needs. It's well worth the effort to spend some time tweaking the terminal to fit your taste, because sooner or later, you are sure to come across a task that is more easily accomplished using the command line than the GUI.

BashStyle-NG ( is a GUI utility that allows the user to customize the command line in more innovative ways. Some of the options provided include:
  • The ability to tweak the prompt in interesting ways to display important information in various colours.
  • Colourizing output from tools like grep and man for easy readability
  • Creating aliases
  • Tweak command history, auto completion and internal variables such as the default editor
  • Change behaviour of editors such as vim and nano
  • Manage user profiles

Installing BashStyle-NG is quite easy. Grab the source tarball from and configure, make and make install !

BashStyle uses the python-psyco compiler to speed up execution times. It's a good idea to install it before beginning the actual installation.

sudo yum install python-psyco
tar xvf BashStyle-7.1.tar.bz2
cd bashstyle
make && sudo make install

On my machine, BashStyle-NG got installed with root as the owner. This prevented some of the customizations from working correctly when run as a normal user. To fix this, change the permissions of the BashStyle-NG script.

sudo chmod 0777 /usr/share/bashstyle-ng/system/nx-rc

Now all that's left is to invoke BashStyle and start customizing !

1 comment:

Dasun said...

Great man, can't wait until to chek it out. But Hav to wait until the evening.