[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Running debian on WSL (windows-system-for-linux)



On Thu, Mar 25 2021 at 08:02:32 PM, Dan Hitt <dan.hitt@gmail.com> wrote:
> Does anybody have any experience running debian on a WSL
> (windows-system-for-linux) machine?
>

I use WSL (not the newer WSL2) on a work computer.

> I need to get a machine for family use, but i would also like to be able to
> also use it myself.  So i would like to be able to ssh in, back up files
> into it, and do other tasks, maybe even a little programming on it.  (A mac
> can handle all of this sort of thing quite easily, but has a huge price
> tag.)
>

I'm assuming you have a reason for not just running debian on the
computer directly.

> At a job a couple of years ago i put WSL on the windows desktop machine
> they gave me, but i was not in a position to be very aggressive about
> remote usage, and, as i understand it, WSL has evolved since then.  And,
> even then, WSL was more than just a virtual machine guest.
>
> 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

As long as you get sshd running in your WSL debian, you will be able to
ssh fine.  X forwarding should also work, but I've never tried it
myself.

> (b) occasionally do the same sorts of things from its console

You'll need a Windows X server installed.  vcxsrv is open source and
works well for me.

> (c) not have to manually set up and keep alive daemons or special
> services,

A web search will find instructions for configuring WSL daemons to
startup as Windows services.  This will be a one-time process.

> (d) as an extra, keep the debian and windows things on separate disks, if
> possible.

No idea how to do this.  The debian install will go to a directory in
your %LocalAppData%; I guess you could mount a separate disk to that
path, but I've not tried this.

>
> 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).
>

If you set up sshd in your WSL debian, you will end up with a shell in
the debian environment.  You can navigate to the Windows filesystem if
you need to.  You could also setup an ssh server on Windows if you like.
I hear OpenSSH server is available as a feature to enable in Windows.

> Thanks in advance for any advice or pointers.

-- 
regards,
kushal


Reply to: