Run a New Terminal Command Directly from the Dock on Mac

Jan 24, 2022 - 2 Comments

Run new Terminal command from the Mac Dock

Need to run a Terminal command as fast as possible? You can do so right from the Dock with this neat trick for Mac.

You must have the Terminal application open and running, available in the Mac Dock for this trick to work. The rest is super simple:

  1. Locate the Terminal icon in the Dock on Mac, then right-click (or control click) on the Terminal Dock icon
  2. Select “New Command” in the popup menu options
  3. Run new Terminal command from the Mac Dock

  4. Enter the command to run in the ‘New Command’ window
  5. New Command in Terminal from Mac Dock

If you want the shell to persist after the command has finished running, check the box for ‘Run command in shell’, otherwise by default, only the command runs, and a shell will not be available when it has finished running.

I personally like to use this trick with htop, but there are no shortage of commands available to you both by default and through Homebrew.

The Terminal app must be actively running to have these Dock menu options available. You’ll see there’s also handy shortcuts for New Terminal Window, and New Remote Connection as well.

And by the way, this trick exists in both modern and much older versions of Mac OS X, so if you’re running on a considerably older Mac you’ll be able to use this too.

We first covered this trick 13 years

.

Related articles:

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

2 Comments

» Comments RSS Feed

  1. Rudi says:

    Does not show up on M1 and Monterey 12.1!

    • Paul says:

      I am able to confirm this works on basically every Mac, including in Monterey and M1 Macs. Remember, you must have Terminal already open before the menu options appear in the Dock. After Terminal is already open, right-clicking on the icon in Dock will show the menu options.

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