The iTerm app for Mac is a great terminal alternative that has some unique features, one of which is that you can setup a hotkey or keyboard shortcut to instantly access an iTerm2 terminal as a slide-out command line from the top of the screen, from anywhere in MacOS.
We’ll be using the iTerm2 app for this article, rather than the default Terminal app on Mac, because while you can use this trick to open Terminal by keyboard shortcut, it won’t slide down from the top of the Mac screen, or disappear, in the same way as what is available through iTerm. You can get iTerm2 for free from the iterm2.com site here, or with brew cask.
How to Use iTerm as a Slide-out Terminal from Top of Mac Screen
You can instantly access an iTerm terminal that slides down from the top of the screen by setting a hotkey or keyboard shortcut, here’s how to do this:
- Open the iTerm app on the Mac
- Pull down the iTerm menu and choose “Settings”
- Go to “Keys”
- Go to the “Hotkey” tab
- Click on “Create a Dedicated Hotkey Window”
- Click into “Hotkey” and set your hotkey by pressing the keyboard shortcut you wish to use to access the iTerm terminal from anywhere, in the example here we chose control+option+command+T
- Set any other preferences as desired, then click on “OK”
- Test out your new universal terminal hotkey shortcut by pressing your chosen keyboard shortcut (control+option+command+T if you followed our example) and the the terminal will slide out from the top of the Mac screen
You can access this terminal console from anywhere on the Mac by using this keyboard shortcut, whether you’re in Finder, Safari, Chrome, Notes, UTM, VMWare, Xcode, or any other app.
Similar tricks have been around for a while with different versions of iTerm, and we covered something like this over a decade ago with a different app for older versions of Mac OS X called TotalTerminal, and even with iTerm2 itself, though configuration was slightly different then.
If you routinely use the command line for quick tasks, or you simply want an easily accessible instant terminal from anywhere on the Mac, this iTerm hotkey trick may be the perfect solution for you. Check it out, and see if it fits well into your workflow.