---
title: "stty erase ^H"
author: "falchion"
date: "2010-04-25T15:18:10Z"
tags: ["Bash", "Linux", "Oracle"]
categories: ["操作系统"]
slug: "stty-erase-h"
draft: false
lastmod: "2010-04-25T16:21:13Z"
id: 652571
url: "https://falchion.iteye.com/blog/652571"
---

^H不是H键的意思，是backspace  
主要是当你的终端backspace有问题的时候才需要设置

在linux环境下使用sqlplus，在回删（backspace）时往往会出现 一串的乱码。出现乱码是由于oracle的sqlplus不使用gnu的readline库造成的。  
   
  解决方法有两种：  
   
1。要使用回删键（backspace）时，同时按住ctrl键  
   
2。设定环境变量  
   
在bash下：$ stty erase ^?  
或者把 stty erase ^? 添加到.bash\_profile中。  
   
在csh下：$ stty erase ^H  
或者把 stty erase ^H  添加到.cshrc中。