Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Quick Correction of Command input errors under shell

Shulou Source: shulou.com Published: 2022-06-03 05:52:48 11月23日 Update

When entering commands, many people like to use "left and right arrow" plus "Backspace key" to delete or modify characters, which can not achieve fast operation.

Now provide some faster methods to operate, the default operation is in shell

1. Delete Typ

Ctrl-u deletes all characters before the cursor to the left

Ctrl-k removes all characters after the cursor to the right

CTRL-w removes the word before the cursor to the left

CTRL-h removes the cursor one character to the left

Ctrl-l clears the screen, keeping only one line

two。 Movement Typ

Move the Ctrl-a cursor to the front, mnemonic: ahead

Ctrl-e cursor moves to the end, mnemonic: end

Ctrl-b cursor moves to the left

3. Historical record

Ctrl-p repeatedly opens the most recent command history

4. Execute a command

Ctrl-j,Ctrl-m,Ctrl-o is similar to the operation performed by enter

Tags: Cursor character command move history type input line screen method time is in arrow after before error Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Redmi Huawei Linux NVidia Shulou Tech Info