Skip to content

Help us create more tutorials! Make a donation using the Donate button or become a member using the button below to hide this banner and track your progress.

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 Course > Terminal Tips