As a linux user, you will certainly make an intensive use of command lines. To optimize your time and gain in efficieny, here are some keyboard shortcuts to navigate through your commands typed in a terminal.
- ALT-R: Undo all changes made to a command line.
- ALT+CTRL+E: Expand a command line.
- CTRL+R: Incremental search of history.
- ALT+P: Non-incremental search of history.
- CTRL+A: Move at the beginning of the line.
- CTRL+E: Move to the end of the line.
- CTRL+U: Delete items from the cursor position to the beginning of the line.
- CTRL+K Delete items from the cursor position to the end of the line.
- CTRL+W: Delete items from the cursor position to the start of the word.
- CTRL+Y: Paste text from the clipboard.
- CTRL+L: Clear the screen.Only the selected line will be displayed
- !!: Execute the last command in history
- !xxx: Run the last command in history starting with xxx (replace x with the command of your choice)
- !n: Execute the nth command in history
This document, titled « Ubuntu - Keyboard shortcuts to be used in a terminal », is available under the Creative Commons license. Any copy, reuse, or modification of the content should be sufficiently credited to CCM (ccm.net).