Geek Posted July 18, 2011 Posted July 18, 2011 <div class="KonaBody"><p>Using the command line <a href="http://osxdaily.com/2007/02/01/how-to-launch-gui-applications-from-the-terminal/">open</a> tool, you can immediately launch any URL from the Terminal into the default web browser. The syntax is remarkably easy:</p> <p><code>open http://osxdaily.com</code></p> <p>You can try this with any URL, even complex URL strings, although long query strings are best when placed into quotations. You can also specify port numbers:</p> <p><code>open http://yahoo.com:80</code></p> <p>Be sure to include http:// or https:// or it will look for a local file instead, but also suggest that you made an error: “Perhaps you meant ‘http://yahoo.com’?”</p> <p>The open utility comes from Mac OS X’s ancestral NextStep roots and offers the ability to launch files and GUI apps from the <a href="http://osxdaily.com/category/command-line/">command line</a>. We’ve used it recently to a <a href="http://osxdaily.com/2011/05/11/multiple-instances-application-mac/"> launch multiple instances of a single app</a>, and to <a href="http://osxdaily.com/2009/11/30/open-current-folder-in-finder-from-the-terminal/">open the present working directory in Finder</a>.</p> </div> <p><a href="http://feedads.g.doubleclick.net/~a/UfEHGyVZNdkfUf-pOWj2W8NSFM0/0/da"><img src="http://feedads.g.doubleclick.net/~a/UfEHGyVZNdkfUf-pOWj2W8NSFM0/0/di" border="0" ismap="true"></img></a><br/> <a href="http://feedads.g.doubleclick.net/~a/UfEHGyVZNdkfUf-pOWj2W8NSFM0/1/da"><img src="http://feedads.g.doubleclick.net/~a/UfEHGyVZNdkfUf-pOWj2W8NSFM0/1/di" border="0" ismap="true"></img></a></p><div class="feedflare"> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=gUk2npM2Z3I:9t4ua4gb_0E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=gUk2npM2Z3I:9t4ua4gb_0E:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=gUk2npM2Z3I:9t4ua4gb_0E:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=gUk2npM2Z3I:9t4ua4gb_0E:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/osxdaily?i=gUk2npM2Z3I:9t4ua4gb_0E:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=gUk2npM2Z3I:9t4ua4gb_0E:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/osxdaily?a=gUk2npM2Z3I:9t4ua4gb_0E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/osxdaily?d=qj6IDK7rITs" border="0"></img></a> </div><img src="http://feeds.feedburner.com/~r/osxdaily/~4/gUk2npM2Z3I" height="1" width="1"/> View the full article
Recommended Posts