Skip to content

How To Blog

how to

  • How To Check Your Router For Malware How-To
  • Best Free Video Editing Software for Windows or Mac in 2021 Reviews
  • How To Send a PDF File To a Kindle Computer Tips
  • How to Change the Location of Spotify’s Local Storage in Windows Computer Tips
  • How you can take screenshot On Steam Computer Tips
  • OTT Explains: What Is Drupal? Web Site Tips
  • How to Bypass Torrent Blocking by your ISP How-To
  • Free Up Disk Space using TreeSize Computer Tips

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Posted on October 10, 2020 By blog_786 No Comments on How To Run a Terminal Command Using a Keyboard Shortcut On Mac

How To Run a Terminal Command Using a Keyboard Shortcut On Mac.

With the built-in Terminal application on your Mac, you can run a series of commands to perform various actions on your computer. Terminal commands cover a lot of things that you usually do on your machines, from taking screenshots to renaming an entire group of files at once.

The only thing that may not seem inconvenient to you is to launch the Terminal application every time you want to execute a command. What if there was a better and faster way to run terminal commands on Mac?

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Well, it really is. In fact, there are several ways to launch a Terminal command using a keyboard shortcut on a Mac. You can assign your favorite keyboard shortcut to your specific command, and pressing that shortcut will execute that command on your computer.

Use an application to run commands with a shortcut on a Mac

The easiest way to assign keyboard shortcuts to your commands is to use a third party application called iCanHazShortcut. This app makes it much easier to assign any keyboard shortcut to literally any command on your Mac.

To customize an application, all you need to know is the keyboard shortcut you want to assign and the command you need to execute.

Download the free open source application to your Mac and move it to the Applications folder. After installation, launch the application.

–

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

When the application interface has loaded, you will by default be on the Shortcuts tab. On this screen, find the button with the + (plus) sign at the bottom and click on it to add a new shortcut.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

On the next screen, you can customize the shortcut as well as the command to be executed. Here’s what you need to enter in each of the fields on the screen.

Shortcut – Place your cursor in this field and enter the shortcut you want to assign to the command.
An action is an optional name that you can assign to later search for a shortcut in the list.
Command – Enter here the exact command you want to execute.
Workdir – If your team needs a specific directory as a working directory, select it here.

You can do a test run by clicking on the play icon below. If you’re happy with it, click on the icon next to it and the shortcut will be saved.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

The app’s Settings tab also has several options that you can tweak. This should give you more control over how the application works on your Mac.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

From now on, when you press the specified keyboard shortcut, it launches your Terminal command.

If more than one command needs to be executed, you can also add them to the application. Labels can be changed and even removed if you like.

Execute commands with a shortcut using Automator

Automator also lets you run your commands with a keyboard shortcut. First, you need to create a service containing your command and then assign a keyboard shortcut to the service.

Launch the Automator app on your Mac. When the new document screen appears, click Tools and select Select.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

On the next screen, find the action named “Run Shell Script” in the list of actions. When you find it, drag it to the main panel on the right side.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

You will see a large white box below the action you just added. Enter all the commands you want to execute in this field. Think of this field as a terminal window where you enter your commands.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

When you’ve entered your commands, click the File menu at the top and select Save to save the service. Enter a friendly name for the service and click Save.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Now that the service has been created, it’s time to assign a keyboard shortcut to it. To do this, click the Apple logo in the upper left corner and select System Preferences. On the next screen select “Keyboard”.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Go to the Shortcuts tab and select Services from the list on the left. Then find your service in the list on the right, click it and press the desired keyboard shortcut.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Your service will be assigned the keyboard shortcut of your choice.

When you click this shortcut, it starts a service, which in turn executes your terminal command on your Mac.

Use ActionShortcuts to run commands with the shortcut

ActionShortcuts lets you run more things than just traditional terminal commands. It allows you to run Apple scripts, workflows, services, and of course, terminal commands.

Unlike other methods, this app is paid and costs $ 2.99. You can use a 7-day trial if you want to try it first.

Shown below is how to run a terminal command using a keyboard shortcut using this application.

Launch TextEdit app on your Mac. Open the Format menu and choose Make Plain Text to remove the formatting.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Enter in the file all the Terminal commands that you want to execute. Then save the file by clicking the File menu and choosing Save.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

In the Save As dialog box, enter any file name, but make sure the extension is a command. Click “Save” to save the file.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Download, install and open the ActionShortcuts app on your Mac. Click the Open Scripts Folder button in the main interface.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

When the folder opens, drag the batch file into it. Go back to the app and you will see your file listed. Click the Record Shortcut button next to the file to assign a keyboard shortcut.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Once a shortcut is assigned, clicking on it will launch a .command file containing your commands on your Mac.

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

If you want to add additional files to run, you can do so by clicking the application icon in the menu bar and choosing Open Scripts Folder. All commands that need to be executed must be placed in this folder and the application will recognize them.

–

How To Run a Terminal Command Using a Keyboard Shortcut On Mac

Tutorials Tags:Execute commands with a shortcut using Automator, How To Run a Terminal Command Using a Keyboard Shortcut On Mac, Use ActionShortcuts to run commands with the shortcut, Use an application to run commands with a shortcut on a Mac

Post navigation

Previous Post: How To Update Mac OS X & Mac Apps From Terminal
Next Post: The Best Mac Keyboard Shortcuts to Learn

Related Posts

  • How to use apple pay to send money Tutorials
  • How To Mirror Your Mac Laptop To a PC Monitor Tutorials
  • How To Set Up iCloud On Mac, Windows, & iOS Tutorials
  • How To Create Smart Mailboxes In Mail On Mac Tutorials
  • How to Lock an App on iPhone and iPad iPad
  • How to Use Universal Control Across Macs and iPads Tutorials

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Apple Watch
  • Computer Tips
  • Cool Websites
  • Free Software Downloads
  • Gadgets
  • Gaming
  • General Software
  • Google Software/Tips
  • Hardware
  • How-To
  • iOS
  • iPad
  • iPhone
  • Linux Tips
  • macOS
  • MS Office Tips
  • Networking
  • Product Reviews
  • Reviews
  • Safari
  • Smart Home
  • Smartphones
  • Software Reviews
  • technology
  • text
  • Tutorials
  • Uncategorized
  • Urdu Books PDF
  • Web Site Tips
  • Windows
  • Windows 10
  • January 2023
  • December 2022
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
  • January 2021
  • December 2020
  • November 2020
  • October 2020
  • September 2020
  • August 2020
  • July 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • December 2019
  • July 2019
  • May 2019
  • April 2019
  • January 2019
  • December 2018
  • November 2018
  • October 2018

2021 Android ) Apple apps Best browser change Chrome Closing words Concluding remarks Download email Error Facebook From Google Image Internet Keyboard Mac make Movies Music online Packaging phone? Photos Print Shortcuts sites Switch Time Tips Tricks turn using Video Videos Watch What With Word Working? your YouTube

  • Best canon mp11dx calculator 2020

    Best canon mp11dx calculator 2020

  • How to Make And Use Dropbox Paper Templates Computer Tips
  • Windows 7/8/10 – How to Join a Domain How-To
  • Turn Off Indexing in Windows for Better Performance Computer Tips
  • vat calculator malta

    If we calculate value added tax of malta we need vat calculator malta.A best calculate tax malta. Value added tax (VAT) in Malta was first introduced in 1995, and has undergone various changes since then. When Malta became an EU member in 2004, VAT in Malta was harmonized with the EU’s Council Directive regarding VAT. A...<p class="more-link-wrap"><a href="https://blog.pkrtousd.gb.net/vat-calculator-malta/" class="more-link">Read More<span class="screen-reader-text"> “vat calculator malta”</span> »</a></p>

  • How to make offline PC games faster or slower Gaming
  • What Is Google Exposure Notifications for COVID Protection? Google Software/Tips
  • Computer Making a Whirring Noise? Here’s How to Fix It Help Desk

Copyright © 2023 How To Blog.

Powered by PressBook News WordPress theme

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Go to mobile version