Home > Common Problem > body text

Run new Terminal commands directly from the Dock on your Mac

PHPz
Release: 2023-04-13 14:52:06
forward
697 people have browsed it

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

You must have the Terminal app open and running in the Mac Dock for this trick to work. The rest is super easy:

    1. Find the Terminal icon in the Dock on your Mac and right-click (or control-click) the Terminal Dock icon
    2. Select "New Command" in the pop-up menu option

Run new Terminal commands directly from the Dock on your Mac

    1. ##In the "New Command" window Enter the command to run in

Run new Terminal commands directly from the Dock on your Mac

If you want the shell to persist after the command completes, check Run command in shell ” checkbox, otherwise by default, only the command will run, and when it completes, the shell will not be available.

I personally like to use this trick with htop, but there is no shortage of commands that work both by default and through Homebrew.

The Terminal application must be running for these Dock menu options to be available. You'll see that the new terminal window and new remote connection also have handy shortcuts.

By the way, this trick exists in both modern and older versions of Mac OS X, so if you're running on a fairly old Mac, you can use it too.

The above is the detailed content of Run new Terminal commands directly from the Dock on your Mac. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:yundongfang.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template