Open an .html file with default browser using Bash on Mac

前端 未结 8 1632
陌清茗
陌清茗 2020-12-13 17:17

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

8条回答
  •  时光取名叫无心
    2020-12-13 17:26

    from the directory containing index.html, try...

    open ./index.html
    

    the open command opens a file (or directory, or URL). open is included with MacOSx. specifics and options can be found using

    man open
    

    note: default application is determined via LaunchServices.

提交回复
热议问题