Terminal / Console Keyboard Shortcuts

Date: 2017-11-10

Source: https://unix.stackexchange.com/questions/6/what-are-your-favorite-command-line-features-or-tricks

  • Ctrl+U – Cut the current line
  • Ctrl+Y – Paste a line cut with Ctrl+U
  • Ctrl+L – Clear the screen and redraw the current line
  • Ctrl+G – Get a new line and abandon the current one
  • Ctrl+A to go to the beginning of the line,
  • Ctrl+E to go to the end of the line,
  • Ctrl-K to erase from the cursor to the end of the line.
  • CTRL+R for searching/activating previously executed commands (the contents of ~/.bash_history).
  • ALT+ . to insert preceding line’s final parameter

Frequently used commands:

# execute last command as root
sudo !!
# move to previous dir 
cd -
9290cookie-checkTerminal / Console Keyboard Shortcuts