You can use keyboard shortcuts and other command line tricks to make entering commands easier and faster. You might already know about the ‘tab’ key which completes partial commands and even file and directory names.
Here are some other keyboard shortcuts you can use within terminal:
Move to the start of the line.
Move to the end of the line.
Moves the cursor forward to the next occurrence of x.
Moves the cursor backwards to the previous occurrence of x.
Delete from the cursor to the beginning of the line.
Delete from the cursor to the end of the line.
Delete from the cursor to the start of the word.
Pastes text from the clipboard.
Clear the screen leaving the current line at the top of the screen.
Undo the last changes.
Undo all changes to the line.
Expand command line.
Incremental reverse search of history.
Non-incremental reverse search of history.
Execute last command in history
Execute last command in history beginning with abc
Execute nth command in history
Replace first occurrence of abc with xyz in last command and execute it