You can use several Keyboard and mouse shortcuts in the Terminal app.
You can use the Left and Right Arrow keys to correct typing errors before you press Return to execute a command.
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.
Press Return to execute the command.
You can repeat a previous command without retyping it.
Press the Up Arrow key until you see the command you want to repeat.
Make any modifications, then press Return.
You can insert the path name of a file or folder on the command line without typing.
Drag the file or folder from a Finder window and drop it in a Terminal window.
You might need to add a space to your command before dragging a file or folder to the Terminal window.