Show Menu

Bash command line shortcuts Cheat Sheet by clyde.stiller

Bash command line shortcuts

Bash Editing Shortcuts

Ctrl + kdelete from cursor to the end of the command line
Ctrl + ypaste word or text that was cut using one of the deletion shortcuts
Ctrl + xxmove between start of command line and current cursor position
Alt + bmove backward one word
Alt + fmove forward one word
Alt + ddelete to end of word starting at cursor
Alt + ccapitalize to end of word starting at cursor
Alt + umake uppercase from cursor to end of word
 

Bash Bang (!) Commands

!!run last command
!blahrun the most recent command that starts with ‘blah’ (e.g. !ls)
!blah:pprint out the command that !blah would run
!*the previous command except for the last word
!nExecute nth command in history
!$Last argument of last command
!^First argument of last command
^abcReplace first occurance of abc with xyz in last command and execute it

Command Recall Shortcuts

Ctrl + gescape from history searching mode
Alt + .use the last word of the previous command
 

Bash Editing Shortcuts 2

Alt-Ctrl-] xmoves the cursor backwards to the previous occurance of x
Alt-] xmoves the cursor forward to the next occurance of x
Ctrl+tswap character under cursor with the previous one
Alt + tswap current word with previous
Alt + lmake lowercase from cursor to end of word
 

Share This Cheat Sheet!

Favourited by 8 Members:

Alasta dttk vintagecandy1 dezos adrienne Provaguest gamiclea mishin

Comments

mishin mishin, 11:08 10 Oct 12

thanks, amazing sheet!

Add a Comment

Your Comment

Please enter your name.

    Please enter your email address

      Please enter your Comment.