I wanted to create bash binding so that ctrl+backspace deletes word in terminal. But I somehow ended up screwing up my backspace and now it doesn't work, it outputs character. I know I can list all binding with bind -P but can't delete them or find where file with bindings is located. I have .inputrc but its empty.


1 Answer 1


You can use bind -r "key" to remove the binding. For example if you have yank bound to "\C-y" issuing bind -r "\C-y" will remove that binding (in the current shell). To reset all key bindings to default use set -o emacs or set -o vi.

  • use 'bind -r <keycode>' if you can't type the key. keycode.info
    – alchemy
    Commented Mar 20, 2020 at 17:45
  • ..and use * in place of a single key if you can't even type a key needed to edit .bashrc or type the above command, ie if you bound any of the keys b,i,n,d,-,r,#s by accident
    – alchemy
    Commented Mar 20, 2020 at 17:53

Not the answer you're looking for? Browse other questions tagged .