21 Essential Mac Terminal Shortcuts for Devs and DevOps to Boost Productivity


If you are that guy who spends most of your time working on the Terminal app on your Mac device, or someone who aspires to be one (Dev or DevOps) then it is really very important to know the Terminal shortcuts so that you can boost your productivity.

Essential Mac Terminal Shortcuts for Devs and DevOps to Boost Productivity
Keyboad Shortcut Description
Cmd + N To open a new Terminal window.
Cmd + T To open a new tab within the current Terminal window.
Cmd + W To close the current Terminal tab or window.
Cmd + Shift + N To create a new Terminal window with the same working directory as the current window.
Cmd + Shift + T To reopen the last closed tab.
Cmd + [Number] To switch to a specific tab by using the number on the keyboard (e.g., Cmd + 1 to switch to the first tab and so on).
Cmd + Option + Right Arrow To Switch to the next tab.
Cmd + Option + Left Arrow To Switch to the previous tab.
Cmd + Shift + [ To move to the next tab in left-to-right order.
Cmd + Shift + ] To move to the previous tab in right-to-left order.
Ctrl + A To Move the cursor to the beginning of the line.
Ctrl + E To move the cursor to the end of the line.
Option + Left Arrow To move the cursor to the previous word.
Option + Right Arrow To move the cursor to the next word.
Ctrl + U To delete from the cursor position to the beginning of the line.
Ctrl + K To delete from the cursor position to the end of the line.
Ctrl + L Clear the screen.
Up Arrow To scroll through previous commands in the command history.
Down Arrow To scroll through subsequent commands in the command history.
Ctrl + R To search command history.
!! To repeat the last command.

Note:

These commands should work on most macOS versions:

  • macOS Sonoma (14.x)
  • macOS Ventura (13.x)
  • macOS Monterey (12.x)
  • macOS Big Sur (11.x)
  • macOS Catalina (10.15)
  • macOS Mojave (10.14)
  • macOS High Sierra (10.13)
  • macOS Sierra (10.12)

Facing issues? Have Questions? Post them here! I am happy to answer!

Author Info:

Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.

Follow him on: X

You can also reach out to him via e-mail: rakesh@code2care.org

Copyright © Code2care 2024 | Privacy Policy | About Us | Contact Us | Sitemap