Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
How can I move around the bash commandline efficiently?

In the Windows prompt, one can go back or forward one word by pressing ctrl and <-/->. What's the equivalent in a bash environment?

share|improve this question

marked as duplicate by quack quixote, Diago Mar 3 '10 at 12:19

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
duplicate: superuser.com/questions/113103/… –  quack quixote Mar 3 '10 at 11:51
add comment

1 Answer

There is M-b and M-f for moving backwards and forwards to the current word, respectively (where M is the meta or Esc key or a combination (like ctrl-meta) ). The section Commands for Moving in the bash manpage lists these and other shortcuts available for moving on the bash shell.

the manual also describes how to customize your bash settings so you can use your known ctrl + left/right to skip words.

share|improve this answer
    
I tried Esc+b/f,not working . –  user11671 Mar 3 '10 at 7:09
3  
Try the Alt key as well. The meta key is also emulated with the alt or windows key on keyboards that have them. –  ayaz Mar 3 '10 at 8:12
    
@user11671: Does bind -p|grep forward-word produce "\ef": forward-word (among other things)? –  Dennis Williamson Mar 3 '10 at 10:28
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.