在Windows终端和执行命令中打开一个新的WSL2选项卡
我在Windows终端上使用WSL2。我有一个需要在使用前端和后端的应用程序,然后才能使用它,因此每次我殿中打开终端窗口,导航到文件夹并运行命令时。 我想设置一个可以打开新标签,导航到文件夹并进行运行的别名。 我看到了Linux的建议,但是这些都没有使用WSL2在Windows终端上工作。有人有这种设置的经验吗?
I'm using WSL2 on Windows terminal. I have an app that needs front end and backend booted before it can be used, so every time I nave to open a terminal window, navigate to a folder and run a command.
I would like to set an alias that would open a new tab, navigate to a folder and do go run .
I saw suggestions for linux, but none of those work on Windows Terminal with WSL2. Anyone have experience with this setup?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以为此创建个人资料。 (当然
,将
ping 8.8.8.8
替换为要运行的实际命令,用您使用的发行版的名称替换ubuntu
),然后替换<< 实际路径,由double-backslashes界定。代码> home \\ zadjii \\ path \\ to \\ project 带有您的 href =“ https://learn.microsoft.com/en-us/windows/terminal/terminal/command-palette” rel =“ nofollow noreferrer”>命令调色板一次打开多个命令:
请参阅href =“ https://learn.microsoft.com/en-us/windows/terminal/customize-settings/actions#run-multiple-actions” rel =“ nofollow noreferrer”>
乘法>乘法>乘法>乘法
You could create a profile for this. Something like
(of course, replace
ping 8.8.8.8
with the actual command you want to run, replaceUbuntu
with the name of the distro you're using, and replacehome\\zadjii\\path\\to\\project
with your actual path, delimited by double-backslashes.)Now, if you wanted to get really crazy, you could create an action in the Command Palette which opened up multiple commands all at once:
see
multipleActions