This post list commonly used keyboard shortcuts in Linux terminal.

  • Auto Completion
    It let’s you skip typing out a whole file name or folder name in the command line. It looks at all the information it has so far, and makes a guess about what you mean. For example, type ls -l Do, and hit Tab, and n. If Tab doesn’t have one clear suggestion to return, it will not autocomplete. In this case, pressing Tab again will list set of possibilities.
    Auto complete also works with commands in Bash. It makes it handy to discover new commands or to refresh your memory if you only remember the first part of a command.
  • Copy and Paste from command line
    CTRL+Shift+C copy from command line
    CTRL+Shift+V paste into command line
  • Command Navigation
    Use Up and Down arrows, which will which will go to commands that you typed in the shell. It works like navigating a list. Press up once and you’ll get to the previous command. Press up twice and it’s the second most recent. To go back down the list use down arrow.
  • Search in Command history
    Press Control + R, and start typing a command or path. Shell will show you what matches. You can use control + R again to cycle between matches.
  • Abandon the command
    Control + C
  • Go to the previous working directory
    cd –
  • Clear screen
    CTRL + L
  • Exit the terminal
    CTRL + d

Manipulating Cursor

  • Move cursor
    CTRL+ A move cursor to beginning of line
    CTRL+ E move cursor to end of line
  • Move one word at at time
    CTRL+Left Arrow move backward one word at a time.
    CTRL+Right Arrow move forward one word at a time.
  • Deletes from the cursor
    CTRL+U deletes from the cursor position to the beginning of the line
    CTRL+K deletes from the cursor position to the end of the line
    CTRL + u wipes current command line