On Fri, Mar 26, 2021 at 7:01 PM Gregory Seidman < gsslist+deb...@anthropohedron.net> wrote:
> On Thu, Mar 25, 2021 at 08:02:32PM -0700, Dan Hitt wrote: > > Does anybody have any experience running debian on a WSL > > (windows-system-for-linux) machine? > > Yes, I use WSL2 on my work machine and run Debian in it. > > [...] > > In particular, i would like to > > (a) be able to remotely access the WSL debian just as if it were debian > > box, including having ssh, rsync, and x windows > > This is entirely doable. Once you get ssh going you have rsync and X11 > tunneling. You don't mention what you'll be connecting from, but if it > doesn't have an X11 server you can run a VNC server under Debian that is an > X11 server, and tunnel VNC over SSH to get to that desktop from whatever > your client is. > > > (b) occasionally do the same sorts of things from its console > > Easy. It's even pretty easy to run an X11 server on Windows (XMing is an > option, though I prefer Cygwin's X11... yes, I use both WSL2 and Cygwin, > and I mostly use Cygwin) and display to it from WSL2. > > > (c) not have to manually set up and keep alive daemons or special > services, > > I am not entirely certain whether WSL2 comes up on Windows boot, but it > runs services normally when it comes up. You will probably have to muck > with the Windows firewall to redirect ports on the Windows host to the > internal WSL2 IP address. I can't say I've done that. I think WSL2 may be a > per-user thing, so I'm not sure if it can run when you aren't logged in. If > you have yourself logged in with WSL2 up, though, I expect you can switch > users and it will still be up. > > > (d) as an extra, keep the debian and windows things on separate disks, if > > possible. > > WSL2 uses a file on disk essentially as a block device. I vaguely remember > it being possible to use a disk partition directly, but I don't remember. > You can configure where the disk file lives when you create the WSL2 guest. > > > I'm not looking for a multi-boot situation, as i want to be able to > access > > the WSL apparatus while the console is engaged with doing windows > > operations for somebody else (and i guess the converse as well, although > > i'm pretty foggy about sshing into windows). > > There is also definitely a way to set up Cygwin's ssh as a Windows service > (and it might be automatic, though I'm not sure). That may be what you want > for getting in, then you can use WSL2 from that shell for your other > purposes. > > > Thanks in advance for any advice or pointers. > > dan > > Good luck, > --Gregory > Thanks Gregory for your very thorough answer. And thanks also Stefan, Peter, Kushal, John Doe, Tomas, David, and Linux-Fan for your answers and other ideas (such as reversing the roles of Debian and Windows). I'll need to think about it some more. dan