How do I open a file with Chrome from the command line?

后端 未结 15 1415
余生分开走
余生分开走 2020-12-25 09:47

I would like to open a file (index.html) in the current directory with Google Chrome or Chromium from a bash terminal (I\'m using Linux Mint 15). What is the command? I\'v

15条回答
  •  别那么骄傲
    2020-12-25 10:16

    For MacOS, with absolute path (if your Chrome is installed in the /Applications folder) in bash CLI use:

     /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome
    

    So, if you want to open the CNN webpage:

     /Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome  www.cnn.com
    

提交回复
热议问题