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
- Download iTerm2 from the developer, place it into you /Applications/ folder, then launch iTerm2
- Pull down the “iTerm2” menu and choose “Preferences”
- Choose the “Keys” tab and click the “Create a Dedicated Hotkey Window” button
- 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
- Click “OK”, optionally go to the “Profiles” menu and customize the appearance by modifying the ‘Hotkey Window’ profile as desired
- Confirm the drop-down instant terminal window works as expected by pressing your hot key (double-tap Control key in this example)
- 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.
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!