Skip to content

Instantly share code, notes, and snippets.

@OleksiyRudenko
Created November 13, 2024 17:52
Show Gist options
  • Save OleksiyRudenko/8e1dc353552f8e5816256cd67859e28b to your computer and use it in GitHub Desktop.
Save OleksiyRudenko/8e1dc353552f8e5816256cd67859e28b to your computer and use it in GitHub Desktop.
WSL 2 Networking
@OleksiyRudenko
Copy link
Author

Update WSL2 kernel manually: microsoft/WSL#5650 (comment)

@OleksiyRudenko
Copy link
Author

[interop]
appendWindowsPath=false

to disable Windows path addition to WSL $PATH

@OleksiyRudenko
Copy link
Author

Open the HKCU\Software\Microsoft\Windows\CurrentVersion\Lxss registry. Find the registry value DistributionName==Kali_Linux. Change defaultUID registry to zero (default is 0x3e8). Open Kali, type passwd change root password.

@OleksiyRudenko
Copy link
Author

WIndows explorer: \\wsl$

@OleksiyRudenko
Copy link
Author

VS Code:

  1. Install Windows VS Code
  2. Add the following to \\$wsl\home\username\.bash_profile
    `alias code='/mnt/c/Users/USERNAME/AppData/Local/Programs/Microsoft\ VS\ Code/Code.exe'
  3. Add the following as the core.editor in .gitconfig:
    code --wait

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment