Modifying this control will update this page automatically
![](https://help.apple.com/assets/63FFD63D71728623E706DB4F/63FFD63E71728623E706DB56/en_US/20f5edbfdfa0bd8ad4c4c6452e5b6761.png)
Correct typing errors in Terminal on Mac
If you make an error while entering a Terminal command, you can correct it before pressing the Return or Enter key to run the command.
In the Terminal app on your Mac, do any of the following to edit the current command line:
Move the cursor one character at a time: Press the Left Arrow key or the Right Arrow key.
Insert characters at cursor position: Type them.
Erase unwanted characters: Use the Delete key or press Control-H, then type the new characters.
Erase the line: Press Control-U.
Erase from cursor position to the end of the line: Press Control-K.
Reposition the cursor within the current command: Press and hold the Option key while using the mouse or trackpad to reposition the cursor.