What are the common Control combinations in a terminal setting

Bash itself uses the GNU readline library, as do many other interactive command-line programs. Readline has the following default key bindings which mimic emacs behaviour:

Moving about on the line:

  • Ctrl + A Go to the beginning of the line you are currently typing on
  • Ctrl + E Go to the end of the line you are currently typing on

Editing text on the line:

  • Ctrl + U Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
  • Ctrl + H Same as backspace
  • Ctrl + W Delete the word before the cursor
  • Ctrl + K Clear the line after the cursor
  • Ctrl + T Swap the last two characters before the cursor
  • Esc + T Swap the last two words before the cursor

Other:

  • Ctrl + L Clears the Screen, similar to the clear command
  • Ctrl + R Let’s you search through previously used commands
  • Ctrl + C Kill whatever you are running
  • Ctrl + D Exit the current shell
  • Ctrl + Z Puts whatever you are running into a suspended background process. fg restores it.

Vim uses:

  • Ctrl-B back (up) one screen
  • Ctrl-D down half screen
  • Ctrl-E scroll text up (cursor doesn't move unless it has to)
  • Ctrl-F foreward (down) one screen
  • Ctrl-G show status
  • Ctrl-H backspace
  • Ctrl-J line down
  • Ctrl-L refresh screen
  • Ctrl-N move down one line (or scroll forward through autocompletions)
  • Ctrl-P move up one line (or scroll backward through autocompletions)
  • Ctrl-R redo (after undo)
  • Ctrl-T go to the file/code you were editing before the last tag jump
  • Ctrl-U up half screen
  • Ctrl-V enter visual block mode
  • Ctrl-W used for managing split windows
  • Ctrl-Y scroll text down (cursor doesn't move unless it has to)