Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

People also ask

How do I open Chrome from command line?

Open Chrome Using Command Prompt You can also do the same thing from the “Run” window. Open Run by typing “Run” in the Windows 10 search bar and selecting the “Run” application. Here, type Chrome and then select the “OK” button. The web browser will now open.

How do I open a file from command line?

To open any file from the command line with the default application, just type open followed by the filename/path.


Just type in the program name followed by the file:

google-chrome {file-path}

ex:

google-chrome ~/index.html

Try

 open {filename}

if it's an .html file it should open in your default browser


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.


Doing some search for chromium you could do it like chromium-browser path|file.