Categories
Coding Shortcuts

Mac Terminal Shortcut

Basic Shortcut

  • Control + C To abort/kill the process that is currently running in this Terminal.
  • Control + D To exit the current tab of Terminal.
  • Command + K / Control + L To clear screen. The same with command “clear”.
  • !! To print and re-run the last entered command.
  • TOP To display all active processes and enter “Q” to quit. Terminal version of Activity Monitor.
  • History + number / nothing To display a specific number or all of the commands executed in the past.

Shortcut for Movement

Shortcut for Editing

  • Control + W To delete the word before the cursor.
  • Control + U To delete the line before the cursor.
  • Control + K To delete the line after the cursor.
  • Escape + T To swap the two words before the cursor.

Commands for Searching Text

  • Control + R Will open up (reverse-i-search)`’: and find the latest matched command that is previously used.

Leave a comment