All Modules / Module 5 / Lesson 1 of 4

Deleting words, lines, and sections without selecting

4 minute read

Module 5

Editing Without Selecting

Forget clicking and dragging to select text. Terminal has keyboard shortcuts that let you delete and edit with surgical precision. In this module, you'll learn to fix and modify commands faster than you ever could by retyping them. Three shortcuts will replace almost everything you do with a mouse.

The Mouse Trap

When you need to edit something in Terminal, your instinct is to reach for the mouse — highlight the text, delete it, type something new.

That works. But it's slow. And it takes your hands off the keyboard, breaking your flow.

There's a better way: keyboard shortcuts that delete and edit text instantly.

Delete by Word, Not by Character

Instead of holding backspace to delete one character at a time:

Option + Delete

Delete Previous Word

Deletes the entire word before your cursor. One keystroke, one word gone.

Try it: Type hello world test, then press Option + Delete. "test" disappears instantly.

Key Takeaway

Stop holding backspace. Option + Delete removes entire words at once.