Oracle在linux下命令行无法使用退格键退格,无法使用上下键切换历史命令的解决办法

2023-06-25,,

使用xshell等客户端登录oracl时在命令行无法使用退格键也无法使用上下键切换历史命令可以使用rlwrap解决

1,linux环境

2,下载rlwrap

wget http://files.cnblogs.com/files/killkill/rlwrap-0.30.tar.gz.zip

3,解压安装

tar -xf rlwrap-0.30.tar.gz.zip

cd rlwrap-0.30

./configure

make

make install

4,设置环境变量

vim /home/oracle/.bash_profile

在尾部添加

alias sqlplus='rlwrap sqlplus'
alias rman='rlwrap rman'

设置生效

source /home/oracle/.bash_profile

完美解决问题

PS:在configure出现错误 You need the GNU readline library(ftp://ftp.gnu.org/gnu/readline/ ) to build
this program!

解决办法:yum -y install readline*  一定要加*号

Oracle在linux下命令行无法使用退格键退格,无法使用上下键切换历史命令的解决办法的相关教程结束。

《Oracle在linux下命令行无法使用退格键退格,无法使用上下键切换历史命令的解决办法.doc》

下载本文的Word格式文档,以方便收藏与打印。