ubuntu终端按回退键出现^?

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/woxueplc/article/details/80577412
系统:14.04.1-Ubuntu
问题:ubuntu终端按回退键出现^?, 实例如下:

解决办法:
1. 在当前用户目录下,打开.bash_profile, 其内容如下所示:

# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
f
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME

stty erase ^?

2. 增加红色字体:stty erase ^?, 保存

3.
使其立刻生效
方法之一为:在终端运行:source .bash_profile

4. 测试:在终端输入字符串, 按下回退键
   成功。

猜你喜欢

转载自blog.csdn.net/woxueplc/article/details/80577412