我已经为我的Windows 11发行版和Ubuntu20.04安装了WSL。我看到很多人说我可以使用命令,而不需要用wsl命令打开发行版。Processing fstab with mount -a failed.例如:wsl rsync -r -v /mnt/d/DUMMY_SOURCE/ /mnt/e/DUMMY_DESTINATION
唯一真正起作用的wsl命令是<
MobaXterm没有显示WSL命令的所有信息,甚至没有要求用户输入。.\MobaXterm.exe -newtab "wsl bash -c 'command here which asks user for an input'"
,但是当我直接在powershell上运行wsl bash -c 'command here which asks use
wsl -h显示以下内容: --exec, -e <CommandLine> Execute the specified command without using the default此外,作为示例,我现在有三种可能的方法来从我的PowerShell提示符运行Linux ls (即,这将不是ls的Get-ChildItem别名,而是通过WSL的Linux命令): PS C:\> wsl-e ls # Alternatively, wsl --exec ls
PS C