Command Line Editing Using Keystrokes

By Hemanta Sundaray on 2022-07-08

The following will work on many Unix programs that use these standard keystrokes.

Keystroke Action
CTRL-A Move the cursor to the beginning of the line.
CTRL-E Move the cursor to the end of the line.
CTRL-W Erase the preeceding word.
CTRL-U Erase from cursor to the beginning of the line.
CTRL-K Erase from cursor to the end of the line.
CTRL-Y Paste erased text.

Join the Newsletter