up vote 1 down vote favorite
share [g+] share [fb]

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?

link|improve this question

0% accept rate
duplicate: superuser.com/questions/113103/… – quack quixote Mar 3 '10 at 11:51
feedback

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

This question covers exactly the same ground as earlier questions on this topic; its answers may be merged with another identical question. See the FAQ.

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). 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.

link|improve this answer
I tried Esc+b/f,not working . – user11671 Mar 3 '10 at 7:09
1  
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
feedback

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