Running Unix Executables

When you’ve selected a Unix Executable or a Shell Script in LaunchBar, press Return to execute it in a new Terminal window.

The factory configuration contains an indexing rule named “Unix Executables”. This rule is disabled by default - turn it on to get access to a number of commonly used command line tools such as “man”, “ssh”, “traceroute”, etc.

If you prefer to use iTerm in favor of Terminal, you can specify your “Preferred Terminal application” in the Actions pane of LaunchBar preferences.

Running in background

By default, LaunchBar runs Unix Executables and Shell Scripts in a newly opened Terminal window. You can optionally run them in background (without any window) by opening them with Option-Return.

Passing string parameters

To pass string parameters to Unix Executables and Shell Scripts, do one of the following:


Input Result
MAN [Space] bash opens the “bash” man page
TRR [Space] hostname runs the traceroute command for the given host
SSH [Space] hostname establishes an SSH connection to the given host
CAL [Space] 1984 shows a calendar of 1984

Passing files and URLs as arguments

You can pass file paths or URLs to Unix Executables and Shell Scripts either via drag and drop or via LaunchBar’s “Send to…” functionality. The passed file paths or URLs will then be appended to the command-line.

Drag and drop: Select the desired command in LaunchBar and drag items e.g. from Finder onto that command. Choose “Send to…” from the pop-up menu or hold down the Command key during the drag to pass the dragged items immediately.

Send to: Select a file or URL in LaunchBar, then press the Tab key to trigger the “Send to…” action. Now select the desired target command and press Return.

Preparing Shell Scripts

LaunchBar must be able to distinguish a Shell Script from an ordinary plain text file. First, make sure that your script contains a proper shebang line:

puts 'Hello world'

Further, the script must have execute permissions set to make LaunchBar recognize it as a Unix Executable:

chmod +x MyHelloWorldScript