Skip to content

Try our new Crash Courses!

Buy one of our new Crash Courses, now hosted on Podia.

Move through text in your terminal using these keyboard shortcuts

Summary

macOS

Go to the beginning or end of a line:

Ctrl+A or Ctrl+E

Go to beginning or end of a word:

Alt+Left or Alt+Right

Delete from cursor to the beginning or end of the line:

Ctrl+U and Ctrl+K

Delete from cursor to the beginning or end of a word:

Ctrl+W or Esc+D / Option+D

Exercises

Try typing some words in the terminal and using the shortcuts above to navigate through it or delete it (the exact words don’t matter).

References

Terminal User Guide on Apple Support (see the “Edit a command line” section)

Back to: Terminal Reference > Terminal Tips