Answer the question
In order to leave comments, you need to log in
WSL and PowerShell integration?
Hello!
In Powershell (ps) you can type cmd and get into the command line, wsl and get into the Linux subsystem, in wsl you can execute Linux commands, but Windows cannot. How to make it so that if you enter powershell in wsl, then the PowerShell shell will open, if you enter cmd, then the command line will open (as if you enter cmd in ps) ?! How to make it possible to execute Linux commands in PowerShell and Windows commands in WSL?!
How to implement everything?!!! Please help, please don't ignore me!
Answer the question
In order to leave comments, you need to log in
Personally, I didn't need it, but it already works right now.
Only in wsl you need to run not cmd, but cmd.exe, not powershell, but powershell.exe - i.e. specify the full name of the Windows executable file. For system utilities, this works without specifying a path, because Windows system directories are registered in the PATH wsl variable, for programs installed in "Program Files" or in other places, you must specify the full path. Windows disks are mounted in wsl at /mnt/c/, /mnt/d/, ...
https://docs.microsoft.com/ru-ru/windows/wsl/interop
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question