0

I am trying to work in the BASH shell on a shared CentOS 7 Linux machine. I am not the admin. The default shell was set to TCSH for new users. I access it remote via ssh. When I type on my keyboard in the terminal (logged in the TCSH shell) all my keys on my keyboard function properly. If I switch my terminal from TCSH to BASH by typing bash, the n character doesn't work within the terminal prompt. For example, if I type conda, what displays in the terminal is coda as if it isn't registering. It only seems to occur when I switch to the BASH shell. I have an extra keyboard and I tried plugging that in and was unable to get the n to work as well. However, capital N still works.

I work with windows and ssh using the Windows Subsystem for Linux (Ubuntu flavor) and I use VS code as my terminal GUI. I thought that the Linux Subsystem might have something to do with it, but my admin logged onto my user using Cygwin and had similar results. Other users have had similar issues in the past on this machine but are no longer part of our group and they are hard to reach. I saw some helps online that seemed to have similar problems with specific keys not work and most indicated that an update to vi or vim was necessary. I had the admin update all packages on the CentOS machine (including vi[m]) and the problem persisted. If I open a vi or vim text and type n, the key registers. It seems to be specific to the BASH terminal.

I was informed to check for an ~/.inputrc file in my home directory but no such file exists. Since my n character doesn't function, I tested several inputs in the tcsh shell to open a clean version of bash: bash --norc, as well as env HOME=/nowhere bash. Both clean bash profiles still had similar issues with no registering n characters. Typing echo $INPUTRC in both the bash and tcsh environment gave no outputs.

I cannot figure out what might be causing this issue and any advice is appreciated. Thanks in advance.

Chris Davies
  • 116,213
  • 16
  • 160
  • 287
Jon
  • 1
  • It's probably something in your .inputrc (see duplicate). If you can't figure out on your own, post the content of that file from your home directory. – Gilles 'SO- stop being evil' Apr 23 '20 at 20:56
  • I do not have a .inputrc file in my home directory – Jon Apr 23 '20 at 21:02
  • 1
    When typing ls -a .i* I get the following ls: cannot access .i*: No such file or directory. I have no .inputrc file to manipulate. – Jon Apr 23 '20 at 21:13
  • Ah, then it's probably the same problem (an accidental key binding) but in a different file. Do other users on the same machine have the same problem? Do you have the same problem if you run bash --norc ? If you run HOME=/nowhere bash ? What is the output of echo $INPUTRC ? – Gilles 'SO- stop being evil' Apr 23 '20 at 21:21
  • @Gilles 'SO- stop being evil' , unfortunately, most of those don't work within the bash environment since I cannot type n. Even pasting them inside a blank text editor (notepad ++) and pasting them back inside the terminal window, the n characters are omitted. I also tried bash --norc , echo $INPUTRC and HOME=/nowhere bash from tcsh as well to see and both options failed to fix the problem. Notepad ++ doesn't add hidden characters as far as I am aware – Jon Apr 23 '20 at 21:37
  • Oh, right, sorry. What's the output of echo $INPUTRC from tcsh? And run env HOME=/nowhere bash from tcsh: this runs bash without your configuration files. Do you still have the problem then? – Gilles 'SO- stop being evil' Apr 23 '20 at 21:41
  • @Gilles'SO-stopbeingevil' the echo $INPUTRC gives this: INPUTRC: Undefined variable.. Also, running env HOME=/nowhere bash from tcsh also does not allow me to type/paste n. Seems like the problem persists. – Jon Apr 23 '20 at 22:00
  • Ok. Strange. I've reopened the question. Please edit it to add all the information that you've posted in the comments. The most likely problem is in a system-wide configuration file. Is there anyone else who has an account on the machine that you could ask to try using bash and see if they have the same problem? – Gilles 'SO- stop being evil' Apr 23 '20 at 22:37
  • 1
    Related questions are https://unix.stackexchange.com/q/383670/5132 , https://unix.stackexchange.com/q/356457/5132 , https://unix.stackexchange.com/q/115462/5132 , and https://unix.stackexchange.com/q/523494/5132 . – JdeBP Apr 23 '20 at 23:12
  • Hey @JdeBP, I looked through these options you marked as related, but unfortunately most of them reference a ~/.inputrc file. One of the options you provided seemed to be promising since it gave an attempt at rebinding broken keys and said you could re-enter the key using cntl + V, but when I tried that, it just pasted what I had in my clipboard. I also can't seem to paste the "n" character event if that is the only character on my clipboard... – Jon Apr 27 '20 at 13:15

0 Answers0