我正在使用CentOS Linux release 7.0.1406 (Core)
并通过 ssh 进入以下系统:
$ uname -a
FreeBSD X 9.2-RELEASE-p5 FreeBSD 9.2-RELEASE-p5 #0 r265974: Wed May 14 07:57:04 PDT 2014 root@X:/usr/obj/usr/src/sys/R610 amd64
$
Run Code Online (Sandbox Code Playgroud)
每当我尝试像在 Linux 终端中一样使用CTRL
+时,我都会得到以下信息:arrow
[alexus@j ~]$ ;5A;5D;5B;5C
Run Code Online (Sandbox Code Playgroud)
我的 Linux 的$TERM
:
[alexus@wcmisdlin02 Desktop]$ echo $TERM
xterm-256color
[alexus@wcmisdlin02 Desktop]$
Run Code Online (Sandbox Code Playgroud)
如何解决这个问题呢?
* 更新 *
每user8558
:
[alexus@wcmisdlin02 Desktop]$ tail -4 /etc/inputrc
# for freebsd console
"\e[H": beginning-of-line
"\e[F": end-of-line
$endif
[alexus@wcmisdlin02 Desktop]$
Run Code Online (Sandbox Code Playgroud)
以下解决了我的问题:
[root@j ~]# tail -1 /etc/profile
export INPUTRC=/usr/local/etc/inputrc
[root@j ~]# cat /usr/local/etc/inputrc
"\e[1;5C": forward-word
"\e[1;5D": backward-word
[root@j ~]#
Run Code Online (Sandbox Code Playgroud)