## How to Install rlwrap on Linux

Great utility to arrow UP/DOWN to choose the history commands as in DOS environment.

rlwrap is an utility that allows you to use up and down arrows like in DOS environment. For Oracle commands like sqlplus, rman, adrci, we can do the same as in DOS environment to choose one of the history command instead of type the same command again.

1) Downloand and install as a package from “http://rpm.pbone.net/” or an alternative web sites.

2) Yum install automatically.

```[root@racnode1 Patches]# yum install rlwrap-0.42-1.el7.x86_64.rpm
Loaded plugins: langpacks
Examining rlwrap-0.42-1.el7.x86_64.rpm: rlwrap-0.42-1.el7.x86_64
Marking rlwrap-0.42-1.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package rlwrap.x86_64 0:0.42-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
rlwrap x86_64 0.42-1.el7 /rlwrap-0.42-1.el7.x86_64 209 k

Transaction Summary
======================================================================================================================================================
Install 1 Package

Total size: 209 k
Installed size: 209 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : rlwrap-0.42-1.el7.x86_64 1/1
Verifying : rlwrap-0.42-1.el7.x86_64 1/1

Installed:
rlwrap.x86_64 0:0.42-1.el7

Complete!

# which rlwrap
/bin/rlwrap

```

3) In \$HOME/oracle/ .bash_profile, define aliases similar as below to make rlwrap enabled for the commands you want:

```# Fo Oracle DB
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”
# For GoldenGate
alias ggsci='rlwrap ./ggsci'```

4) You can use UP/DOWN to choose the history commands as in DOS environment from now on.

Wish you enjoy this new utility for Linux !