Search code examples
linuxterminaliterm2arrow-keystab-completion

tab and arrow keys weird behavior in redhat


I am facing some weird behavior when trying to ssh to the server by using either Iterm2 or OSX Terminal. Basically, the issue is when using tab for auto-completion, it will print one more random extra char in the end, for example:

//the 'e' is extra in this case
$ cd keys/e

And when trying to use any arrow keys for navigation, it basically does not work at all.

//^[[C^[[C^[[C^[[C^[[C^[[C^[[C are printed by pressing arrow keys
$ cd keys/^[[C^[[C^[[C^[[C^[[C^[[C^[[Ce

//Kernel Version
OS Version: 2.6.39-400.246.2.el6uek.x86_64

//Distribution Information
$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.6 (Santiago)

But it works just fine in my macbook, I was guessing it is caused by my server profile setting up, but I have double-checked that I do not have either of the following files in my home:

$ vi .bash_profile
$ vi .bashrc

Any help will be appreciated.


Solution

  • I had it figured out, it is because of my default shell in the server is ksh, need to ask the system admin to change it to bash or zsh.