Linux系统BackSpace 、方向键的问题


来源:https://blog.csdn.net/weixin_34174105/article/details/85938355
在linux/unix系统中连接SSH远程工作时,输出字符后按Backspace键删除时,会出现^H,这对习惯了按Backspace键删除的用户来说,感觉非常别扭,虽然可以通过Ctrl+Backspace组合键实现删除功能。

可通过stty命令修改终端配置来实现Backspace删除功能。如下:


$ id
uid=1002(git) gid=1002(git) groups=1002(git)
$ stty erase ^h

若要恢复Ctrl+Backspace组合键删除功能,可执行以下命令:

$ id
uid=1002(git) gid=1002(git) groups=1002(git)
$ stty erase ^?


快速解决:Ubuntu进入root或在界面中sudo 加后面的命令,使用usermod -s /bin/bash 用户名  (来更改命令行窗口,默认为dash,更改后为shell)

猜你喜欢

转载自www.cnblogs.com/lyhcc/p/10476104.html
今日推荐