Is it possible to start a terminal command without opening the terminal first?

I have some quick commands, and for those I open the terminal window, run the command, and close it again. I generally don’t like my terminal program to be active all the time, because it clutters my dock.

Then I vaguely remembered, that there is the Alt-F2 thing on some Linux-distributions, where you can start a single command without opening a shell window first. I think I never used this function regularly, but this seems to be the thing I’m looking for.

Is there something like this on mac os?

  • 4
    Would apple.stackexchange.com/questions/376778/… help?
    – nohillside
    Jan 2, 2020 at 16:12
  • Uh, yeah, that looks nice. Especially BitBar looks cool. I have to predefine all commands in both cases, but that's okay. Thank you!
    – rcheetah
    Jan 2, 2020 at 16:30
  • 4
    When Alt-F2 is entered in Ubuntu linux the screen goes dark and the dialog box shown in this image appears. You can enter a command such as firefox to launch the Firefox Web Browser. I posted this comment as an example of what the OP is talking about. Jan 2, 2020 at 16:30
  • You can run terminal commands from applescript. Keyboard maestro allow you to set terminal commands to a hotkey. Jan 2, 2020 at 20:06

1 Answer 1


My solution: I created shell scripts for my commands instead of aliases, and included the folder in the PATH variable. Thereby I could call them from any bash shell on the system. Then I used the recommended tool BitBar to call my commands from the menu bar. I guess it would be possible to create a BitBar-Plugin that lets you enter a command, but for now I didn’t take the time to write such a thing. Thanks to everyone who commented!

Update 2023: I used the solution above for years now. But now I'm actually planning to migrate all my scripts to ScriptKit, which seems to be the perfect solution for my problems. Due to it's framework it seems to be easy to use, and offers easy ways to interact with scripts. So this is a hint for people searching for this in 2023.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .