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

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

    As others stated, the solution is to use:

    google-chrome www.google.com
    

    You can also use --incognito to open them in incognito mode:

    google-chrome --incognito www.google.com
    

    Note you can open multiple pages at the same time by just placing them one after the other:

    google-chrome www.google.com www.yahoo.com
    

    If you want to open them from a file, use the command substitution $() to open it and process on the fly:

    google-chrome $(

提交回复
热议问题