Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
796 views
in Technique[技术] by (71.8m points)

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

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've tried the intuitive approaches and have done a few stack and google searches to no avail, oddly overlooked (perhaps painfully obvious). Thanks in advance.

hermes@hades ~/coding/.../public $ google-chrome index.html
google-chrome: command not found
hermes@hades ~/coding/.../public $ google-chromium index.html
google-chromium: command not found
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Just type in the program name followed by the file:

google-chrome {file-path}

ex:

google-chrome ~/index.html

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...