Bash – How to reset all the bind keys in the Bash

bashkeyboard shortcuts

I bound some keys by mistake, and they don't work any more, such as HOME, END, UP, DOWN, LEFT, RIGHT.

Is there a way to reset all the bound keys to their original state?

Best Answer

If it's bash that you misconfigured, you might have done so either in ~/inputrc or in ~/.bashrc. ~/.inputrc is the configuration file for the readline library, which is used by bash and a few other command-line programs to read input. ~/.bashrc is the configuration file of bash itself.

If you start a shell with bash --norc, your ~/.bashrc isn't read, but your ~/.inputrc is. If you start a shell with HOME=/none bash, neither file is read, nor your previous shell history.

Related Question