← Useful Tips
Linux / WSLLinux

Ctrl + U / Ctrl + K: Cut text to the left or right of the cursor

Use Ctrl + U / Ctrl + K to cut text to the left or right of the cursor. It is especially handy when you live in terminals and repeat long commands.

Ctrl + U / Ctrl + K

Why it helps

Use Ctrl + U / Ctrl + K to cut text to the left or right of the cursor. It is especially handy when you live in terminals and repeat long commands.

How to use it

  1. Open the relevant app or terminal.
  2. Use the shortcut or command above in the relevant context.
  3. Check the result; for commands that change data, test on a small example first.
People also search for
Ctrl + U / Ctrl + K: Cut text to the left or right of the cursorCtrl + U / Ctrl + Kcut text to the left or right of the cursorhow to cut text to the left or right of the cursorLinux / WSL cut text to the left or right of the cursor

Related tips