How to Open an App from Anywhere on Mac Command Line

By  on  

Many engineers like myself live in the command line, and perform actions from command line that most others would click an icon for. I've always found opening apps from command line on Macs painful. You need to references the Applications directory, add .app to the name, etc. I just want to open apps by name.

To open an app from any directory by its simple name, you can use the -a argument to open:

open -a  Cyberduck

# Works regardless of case as well
open -a CyBeRdUcK

I love -a for a command like open. Being able to open any app by name is exactly what I want!

Recent Features

  • By
    Conquering Impostor Syndrome

    Two years ago I documented my struggles with Imposter Syndrome and the response was immense.  I received messages of support and commiseration from new web developers, veteran engineers, and even persons of all experience levels in other professions.  I've even caught myself reading the post...

  • By
    How to Create a RetroPie on Raspberry Pi – Graphical Guide

    Today we get to play amazing games on our super powered game consoles, PCs, VR headsets, and even mobile devices.  While I enjoy playing new games these days, I do long for the retro gaming systems I had when I was a kid: the original Nintendo...

Incredible Demos

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!