Skip to content

Instantly share code, notes, and snippets.

@jdoe1024
jdoe1024 / howto.md
Last active March 8, 2023 18:55 — forked from d4v3y0rk/howto.md
Encryption with DM_CRYPT in WSL2

Encrypted Volumes in WSL2

Description

This is a quick guide on how to setup dm_crypt under WSL2 for working with encrypted volumes. I use an encrypted volume to store things like password recovery codes and 2nd factor backup codes etc. I recently switched over to using WSL2 and wanted to figure out how to enable this functionality there. This is the distilled howto for getting it to work.

Guide

First thing you have to do is create a custom WSL2 kernel. Inside your already installed and running WSL2 (ubuntu) installation:

  • Install some required packages.
@jdoe1024
jdoe1024 / JDK11 collisions
Created February 21, 2020 06:42
Java classes/interfaces name collisions
AclEntry: ['java.nio.file.attribute.AclEntry', 'java.security.acl.AclEntry']
AlreadyBoundException: ['java.nio.channels.AlreadyBoundException', 'java.rmi.AlreadyBoundException']
Annotation: ['java.lang.annotation.Annotation', 'java.text.Annotation']
Array: ['java.lang.reflect.Array', 'java.sql.Array']
ArrayType: ['javax.lang.model.type.ArrayType', 'javax.management.openmbean.ArrayType']
Attribute: ['javax.management.Attribute', 'javax.naming.directory.Attribute', 'javax.print.attribute.Attribute', 'javax.xml.stream.events.Attribute']
AttributeList: ['javax.management.AttributeList', 'javax.swing.text.html.parser.AttributeList']
AttributeSet: ['javax.print.attribute.AttributeSet', 'javax.swing.text.AttributeSet']
Attributes: ['java.util.jar.Attributes', 'javax.naming.directory.Attributes']
AuthenticationException: ['javax.naming.AuthenticationException', 'javax.security.sasl.AuthenticationException']