Terminal Has Its Own Clipboard
When you delete text with Ctrl + U or Ctrl + K, Terminal doesn't just delete it — it saves it to a special clipboard.
You can paste it back with:
Ctrl
+
Y
Yank (Paste)
Pastes the last thing you deleted with Ctrl+U or Ctrl+K.
Why This Is Useful
Imagine you have two commands and want to swap parts between them:
- Use ↑ to find a command
- Use Ctrl + U to "cut" the beginning
- Type or navigate to where you want it
- Use Ctrl + Y to paste it back
Key Takeaway
Ctrl + Y pastes back anything you deleted with Ctrl + U or Ctrl + K. Terminal has cut/paste built in.