In linux in CLI I can press ALT + F or ALT + B to move back and forth in terms of words and not one character at a time.
Is this available in Mac?
There is no ALT and I tried Control + F, Fn + F, Command + F but it does not work.
BTW I am using the default console installed.


There are a number of ways to skin this cat.

Firstly, there is an ALT key, but depending on the age of your Mac/keyboard is may be called Option or look like . Using ALT+◀︎ or ▶︎ will move a word at a time using a default shell in the default terminal app.

Secondly, you can tell your shell of choice to use alternate methods. If you have ever used vi and are used to its weird methods of navigation w to move forward a word, b to go back,W to move forward a sentence and so on, then you can tell it to use those instead by typing set -o vi into your shell, now the first method doesn't work, and the weirdy vi method is used instead.

In addition, in Settings > Settings > Keyboard (on Mavericks at least) you can tick this little fella to bring back your ALT+F behaviour:

There are probably way more methods too, it depends on your shell and your shell options basically.

You must log in to answer this question.

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