Friday, 1 October 2010

Several important Bash shortcut

I've been using Bash a lot, and sometimes when typing long command line, having to press the arrow button multiple times to go to the first character is very tiring.

This are few important shortcut that I start to use:

Ctrl + a - Jump to the start of the line
Ctrl + e - Jump to the end of the line
Alt + d - Delete word
Alt + f - Move forward a word, where a word is composed of letters and digits

Alt + b - Move backward a word

More info from this blogpost : http://linuxhelp.blogspot.com/2005/08/bash-shell-shortcuts.html

Or from Bash Reference Manual regarding Readline Movement : http://www.gnu.org/software/bash/manual/bashref.html#Readline-Movement-Commands

2 comments:

  1. > Alt + d - Delete word
    > Alt + f - Move forward a word,
    > where a word is composed of
    > letters and digits
    > Alt + b - Move backward a word

    CTRL I suppose. :)

    ReplyDelete
  2. Hi Lian,

    Nope, it's not CTRL. It's ALT. Tested with Bash :)

    ReplyDelete

Please write your comment about this blog post. Thanks! :)