So, this is what I need :
Let\'s say I have an index.html file.
How do I tell the terminal to open it using the default browser?
(Using
To open the filename.html in the default browser use :
open filename.html
open is a very good command as well as a feature of Mac OS that makes me fall in love with it more deeper. It automatically chooses the appropriate default app to open the file.
And in case you want to open a file in your desired app rather then default :
open -a /Applications/Google\ Chrome.app filename.html
The backslash \ after Google is used to escape the space character.
Alternatively you can write :
open -a "/Applications/Google Chrome.app" filename.html
Hope this helps you ( I know I am very late ) and others !!!.