Get Instant Command Line Access from Anywhere in Mac OS with iTerm2

Mar 14, 2018 - 12 Comments

Access a command line from anywhere on the Mac

If you’re a command line user, you can imagine that it’d be useful to have a Terminal window available instantly to you from anywhere on the Mac, whether you’re currently in the Finder, Safari, Xcode, or any other application entirely. Well there’s no need to imagine, with iTerm you can have an instantly available terminal that drops down from the top of the Macs screen, giving you immediate command line access at the push of a hot key.


Maybe you need to quickly ping a server, use Homebrew, push git changes, reboot or shut down a remote machine, connect to a remote server with ssh, or any other quick task that requires the command line. Whatever the need, you can use this great trick to have an immediately available terminal window from anywhere or from within any application in Mac OS.

To get the drop-down command line, you will use a third party app called iTerm2, which is a popular third party terminal client for the Mac.

How to Setup Instant Command Line Access with iTerm2

  1. Download iTerm2 from the developer, place it into you /Applications/ folder, then launch iTerm2
  2. Pull down the “iTerm2” menu and choose “Preferences”
  3. Choose the “Keys” tab and click the “Create a Dedicated Hotkey Window” button
  4. Enable the Hot key for accessing command line anywhere on Mac with iTerm2

  5. Set your hot key keyboard shortcut as desired, or choose “Double-Tap Key” and set that accordingly, the example here uses a double-tap of the ‘Control’ key to access the drop-down command line panel
  6. Set the Hotkey for instant command line access on Mac

  7. Click “OK”, optionally go to the “Profiles” menu and customize the appearance by modifying the ‘Hotkey Window’ profile as desired
  8. Confirm the drop-down instant terminal window works as expected by pressing your hot key (double-tap Control key in this example)
  9. Access a command line from anywhere on the Mac

  10. Dismiss the drop-down command line panel by clicking outside of the terminal window, or by hitting the hot key again

Once your hot key is set, you can toggle in and out of the drop-down command line from within any application in Mac OS, as long as iTerm2 is open in the background.

The dropdown command line is a standard shell with the full command line environment, tools, and utilities available to it, just like any other terminal window.

Aside from customizing the hot key, you can also customize how the drop-down command line looks by going to iTerm2 Preferences > Profiles > Hotkey Window and modifying the colors, fonts, and other settings as you see fit.

Customize appearance of dropdown command line

Our longtime readers may recall similar posts from quite some time ago about tools like Visor and TotalTerminal that have similar functionality, but iTerm2 is unique in that it’s a universally popular third party terminal application anyway, plus it’s compatible with all modern Mac OS versions.

If having an immediately available command line sounds interesting to you, check out iTerm2 and set up a hotkey, it’s pretty great!

.

Related articles:

Posted by: Paul Horowitz in Command Line, Mac OS, Tips & Tricks

12 Comments

» Comments RSS Feed

  1. Dubz says:

    Kristine how u get so smart

  2. CodeCat says:

    It’s nice to have so many choices of shortcuts to suit our preferences. As a 60% keyboard, Vim user and Ruby developer, I prefer fewest keystrokes to the closest keys and avoiding the mouse. Instead of arguing about what is best, realize it’s just personal preference!🤔

  3. Dave says:

    It takes less time to hit cmd-space, type ter and hit enter.

    • QuattroGam3r says:

      Perhaps you could enlighten the rest of us on how 6 key presses is faster than either a hotkey or a double tap hotkey, I fail to see it.

      • Steve says:

        Well gee I dunno… A pre-loaded terminal app vs dling an app, messing with shortcuts configuring blah blah whatever else they have going on in the article.
        Here I’ll better it.. Move mouse to search, type ter

  4. Sue says:

    Why not just keep Terminal in the dock?

  5. 88HD says:

    I have a Logitech G300s and binding it to one of the buttons works great, thanks for the tip.

  6. Chris says:

    CMD + Space opens Spotlight (a tip itself) by the time you type ‘term’ spotlight has found terminal.app and press return and your there. Fingers never left the keyboard.

  7. cynsa says:

    oh, nice…the look/feel reminds me of my old SGI Xterm days.

  8. Joe Alp says:

    Intersting. launching iterm2 via go2shell or similar would be useful.
    https://itunes.apple.com/us/app/go2shell/id445770608?mt=12

  9. Steve Steele says:

    Nice! Thanks for bringing this terminal app to my attention. I usually have Terminal and Activity Monitor in a desktop space in split view on my second monitor. But I’m going to try iTerm 2. A pull down terminal on my main monitor sounds like a good idea.

Leave a Reply

 

Shop on Amazon.com and help support OSXDaily!

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates

Tips & Tricks

News

iPhone / iPad

Mac

Troubleshooting

Shop on Amazon to help support this site