Useful Command Line Keyboard Shortcuts

Linux Keyboard Shortcuts

 

 Linux Keyboard Shortcuts.

The following keyboard shortcuts are incredibly useful and will save you loads of time:

  • CTRL + U – Cuts text up until the cursor.
  • CTRL + K – Cuts text from the cursor until the end of the line
  • CTRL + Y – Pastes text
  • CTRL + E – Move cursor to end of line
  • CTRL + A – Move cursor to the beginning of the line
  • ALT + F – Jump forward to next space
  • ALT + B – Skip back to previous space
  • ALT + Backspace – Delete the previous word
  • CTRL + W – Cut word behind cursor
  • Shift + Insert – Pastes text into terminal

Just so that the commands above make sense look at the next line of text.

sudo apt-get install programname

As you can see I have a spelling error and for the command to work I would need to change “intall” to “install”.

Imagine the cursor is at the end of the line. There are various ways to get back to the word install to change it.

I could press ALT + B twice which would put the cursor in the following position (denoted by the ^ symbol):

sudo apt-get^intall programname

Now you could press the cursor key and insert the ”s’ into install.

Another useful command is “shift + insert” especially If you need to copy text from a browser into the terminal.