我想在bash终端中使用Google Chrome或Chromium在当前目录中打开一个文件(index.html)(我正在使用Linux Mint 15).命令是什么?我已经尝试了直观的方法,并做了一些堆栈和谷歌搜索无济于事,奇怪的被忽视(也许很痛苦明显).提前致谢.
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
Run Code Online (Sandbox Code Playgroud)
Nic*_*ich 42
只需输入程序名称,然后输入文件:
google-chrome {file-path}
Run Code Online (Sandbox Code Playgroud)
例如:
google-chrome ~/index.html
Run Code Online (Sandbox Code Playgroud)
jay*_*eek 14
从bash shell (在Windows上),您可以使用:
start myFilename.html
并打开一个文件夹:
explorer "C:\Program Files\Git"
添加以供参考,因为我的搜索也在这里登陆.
Ast*_*stm 12
对于 Mac 我正在使用
open -a 'google chrome' /yourPath
Run Code Online (Sandbox Code Playgroud)
col*_*ect 11
此解决方案一直适用于我 - open -a "google\ chrome.app" index.html
- "google\chrome.app"是系统上chrome的名称/位置.
要么
如果Chrome是您的默认浏览器,只需 - open index.html
您可以使用以下终端命令打开文件 (Linux)
google-chrome < filepath >
google-chrome --new-window < filepath >
google-chrome --incognito (--incongnito-mode) < filepath >
<filepath> = localhost/test/../filename.html
Run Code Online (Sandbox Code Playgroud)
小智 5
看起来 Chrome 不在您的 $PATH 中。简单的解决方案可能是卸载并重新安装 Chrome,这应该将它放在您的 $PATH 中。然后
google-chrome [file]
Run Code Online (Sandbox Code Playgroud)
应该为你工作。
归档时间: |
|
查看次数: |
76009 次 |
最近记录: |