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

后端 未结 15 1367
余生分开走
余生分开走 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:36

    Try

    /opt/google/chrome/google-chrome --allow-file-access-from-files index.html
    

    Or

    /usr/bin/google-chrome --allow-file-access-from-files index.html
    

    --allow-file-access-from-files will relax some security settings , useful for testing with local files.

提交回复
热议问题