How do I configure Ctrl-Left and Ctrl-Right as previous/next word shortcuts for bash (currently alt-b and alt-f)?
The correct answer depends on which terminal you are using.
For Gnome Terminal or recent versions of xterm, put this in ~/.inputrc:
For PuTTY, put this in your ~/.inputrc:
For rxvt, put this in your ~/.inputrc:
You can probably get away with putting all of those together in ~/.inputrc.
In all cases, you also need to put this in your ~/.bashrc (or ~/.zshrc):
If that doesn't work, or you have a different terminal, go to your terminal and type Ctrl+V Ctrl+->. Then use that instead of
Note that you need to write the keyboard escape sequences using the inputrc syntax, e.g.
|show 6 more comments|