Installing rlwrap on Linux saves you time

Small Blog entry to spread the word. I hate having to manage a Linux system without this ;) 

rlwrap is an utility that allows you to use up and down arrows in the various commands like sqlplus, rman, adrci, … 
To enable it, you only have to do the following : 

  • Install readline-devel

    (root) # yum install readline-devel

  • Download latest rlwrap from http://utopia.knoware.nl/~hlub/uck/rlwrap/ and unzip it somewhere and Compile it.

    (root) # ./configure
    (root) # make
    (root) # make install

  • For OL6 you can use this RPM instead of manually making it:
         http://rpm.pbone.net/index.php3/stat/4/idpl/15282330/dir/redhat_el_6/com/rlwrap-0.37-1.el6.i686.rpm.html

    Then install it with :

    (root) # yum install rlwrap-0.37-1.el6.i686.rpm

  • Configure aliases in .bash_profile so that rlwrap gets enabled when you start the command

    alias sqlplus=”rlwrap sqlplus”
    alias dgmgrl=”rlwrap dgmgrl”
    alias rman=”rlwrap rman”
    alias lsnrctl=”rlwrap lsnrctl”
    alias asmcmd=”rlwrap asmcmd”
    alias adrci=”rlwrap adrci”
    alias impdp=”rlwrap impdp”
    alias expdp=”rlwrap expdp”

You’ll never go back again ;)

About these ads

6 responses to “Installing rlwrap on Linux saves you time

  1. This information was very helpful. I needed to upgrade lein on a non-development system, and needed to get everything listed in your post. Thanks.

  2. You might want to add the -I ( –pass-sigint-as-sigterm) option to the rlwrap alias to allow a TERM signal (eg ctrl+c) to be send to the command

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s