Technically, this is a bash cheat sheet; however, many of the commands will work with Bourne shell descendants, such as zsh.

N.B. Keep in mind, everything in bash is case sensitive.

Controlling the command line

commanddescription
ctrl+aMove the cursor to the start of the command
ctrl+eMove the cursor to the end of the command

| ctrl+w | Delete what’s on the command line, no matter where the cursor is | | ctrl+k | Delete from your cursor to the end of the command |