Terminal Icon

Repeating commands

Terminal remembers the last few commands you have entered. You can repeat a command you recently used, without retyping it, by using the arrow keys.

To repeat a command, press Up Arrow until you see the command, then press Return.

To repeat a command with modifications, press Up Arrow until you see the command you want. Then press the Left Arrow or Right Arrow to skip over parts of the command you don’t want to change. Press Delete to remove unwanted portions of the command, then type your modifications. Press Return to execute the command.