Use Terminal shortcuts

You can use several Keyboard and mouse shortcuts in the Terminal app.

Correct typing errors

You can use the Left and Right Arrow keys to correct typing errors before you press Return to execute a command.

  1. Do any of the following:

    • To skip backward or forward over parts of a command you don’t want to change, press the Left or Right Arrow key.

    • To remove characters, press Delete.

    • To insert characters, type them.

    • To ignore what you entered and start again, press Control-U.

    • To reposition the cursor within the current command, press and hold the Option key while using the mouse to reposition the cursor.

  2. Press Return to execute the command.

Repeat a command

You can repeat a previous command without retyping it.

  1. Press the Up Arrow key until you see the command you want to repeat.

  2. Make any modifications, then press Return.

Include a file path using drag and drop

You can insert the path name of a file or folder on the command line without typing.