You have typed a long line of command in terminal. But now you want to clear or delete the entire line. Deleting each character in the command will take sometime and bored you. So are there any keyboard shortcuts that allow you to do this? Yes there are some hotkeys to the rescue.
Hotkeys | Description |
---|---|
CTRL + u | Delete the current command. The deleted command will be stored into a buffer. |
CTRL + w | Delete a word. |
CTRL + c | Abort what you are typing. |
CTRL + d | Delete current character. |
Other hotkeys that might help you work faster in the terminal.
Hotkeys | Description |
---|---|
CTRL + e | Move to the end of line. |
CTRL + a | Move to the start of line. |
CTRL + k | Cut text from the cursor to the end of line. |
CTRL + y | Paste the last cut text or buffer. |
CTRL + - | Undo. |
CTRL + b | Backward one character. |
CTRL + f | Forward one character. |
ALT + ← | Backward one word. |
ALT + → | Forward one word. |
Latest posts by Wayan (see all)
- How do I get number of each day for a certain month in Java? - September 8, 2024
- How do I get operating system process information using ProcessHandle? - July 22, 2024
- How do I sum a BigDecimal property of a list of objects using Java Stream API? - July 22, 2024