How To Launch An OS X GUI App From The Command Line

"Open" Command Options

Sometimes, to  launch an OS X GUI app is easier than working with its command line counterpart.  For example:  Though I like “nano”, a command line text editor, my go-to text editor of choice is TextWrangler, a GUI app.  Using the command “open” from the command line makes opening TextWrangler easy.  Here is the string:

open /Applications/TextWrangler.app/

After typing the string and pressing the “return” key, TextWrangler opens in its own window.  Adding “sudo” to launch an OS X GUI app, opens the app with admin privileges:

sudo open /Applications/TextWrangler.app/

If you want to open a program, with a file loaded in it:

open -a “QuickTime Player” ~/Desktop/filename.mp4

The ‘open” command is powerful.  You can launch an OS X GUI App from the command line with many options.  Here they are:

Open_command_options How To Launch An OS X GUI App From The Command Line How To OS X

 

By prometheus

Husband. Father. Grandfather. World class Geek.

2 comments

Leave a comment

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.