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