As a long-term Linux user, I tried running Ubuntu under the Windows Subsystem for Linux. I works!

I have tried to setup ecryptfs, but this fails complaining that kernel module is missing. Here I don't know enough about WSL, but it appears to come with a custom kernel.

Can I essily encrypt WSL? If Luks is the answer, how do I enter the passphrase? The boot process is hidden.

all 7 comments

sorted by: hot top controversial new old
[–] 10 points 3 years ago

For the easy option / question - do you have bitlocker enabled? That’s not enough?

Do you want the encrypted folder to be automatically-unlocked or unlocked with a password

You can build your own Linux kernel for WSL, I haven’t done it and unless that sounds like fun to you that’s not the route I’d go.

  • source
  • [–] 6 points 3 years ago

    Not sure if the Linux crowd can answer this Windows question.

  • source
  • [–] 2 points 3 years ago

    I think this might be possible with WSL2, which is more of a VM type instance, but WSL1 has issues with kernel modules and some networking stuff due to how it integrates with Windows

  • source
  • [–] 2 points 3 years ago* (last edited 3 years ago)

    I've read that systemd-homed can do encrypted home directories but I haven't tried it, much less on WSL but that may get you to achieve the encrypted home directory at least.

    Personally I don't think I would have a need to encrypt all of WSL, but maybe that also makes sense for your case.

    ArchWiki example: https://wiki.archlinux.org/title/Systemd-homed

  • source
  • [–] 2 points 3 years ago

    Would it not be encrypted if you just encrypt your windows drive with bitlocker? Seems kinda redundant to double encrypt to me

  • source
  • [–] 1 point 3 years ago (1 child)

    Yes.

    You'll just boot up into a blank home folder and a completely uncustomized bash (or whatever your default shell is).

    After mounting you'll have to restart your shell or source your .${SHELL}rc

  • source
  • hideshow 2 child comments