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
It looks like Chrome is not in your $PATH the way it should be. Easy solution would probably be to uninstall and reinstall Chrome, which should put it in your $PATH. Then
google-chrome [file]
should work for you.
Doing some search for chromium you could do it like chromium-browser path|file
.
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
From the bash shell (on Windows), you can use:
start myFilename.html
and to open a folder:
explorer "C:\Program Files\Git"
Added for reference, since my search landed here, too.
This solution has always worked for me - open -a "google\ chrome.app" index.html
- where "google\ chrome.app" is the name/location of chrome on your system.
OR
If Chrome is your default browser, simply - open index.html
For Mac i'm using
open -a 'google chrome' /yourPath