在Windows 10的Ubuntu Bash Shell中,如何使用默认程序打开文件或目录? [英] In the Ubuntu Bash shell in Windows 10, how do you open a file or directory with the default program?

查看:51
本文介绍了在Windows 10的Ubuntu Bash Shell中,如何使用默认程序打开文件或目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

例如,如果我设置了要使用Notepad ++打开的 .java 文件,是否可以像 open ./Blah.java 那样运行一些命令来打开Blah.Java在Notepad ++中,还是 open.在Explorer中打开当前目录?在Mac OS X上,此命令 open .

E.g., if I have .java files set to open with Notepad++, is there some command I can run like open ./Blah.java that will open Blah.java in Notepad++, or open . to open the current directory in Explorer? On Mac OS X, open is this command.

推荐答案

您需要包装对于Cygwin,这是 cygstart .

With Cygwin, this is cygstart.

使用PowerShell,这是启动过程.

With PowerShell, this is Start-Process.

您可以从Bash shell运行PowerShell,但这并不理想:

You can run PowerShell from the Bash shell, but it is not ideal:

powershell Start-Process Blah.java

这是当前的 查看全文

相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆