Skip to content

Latest commit

Β 

History

History
57 lines (39 loc) Β· 1.34 KB

File metadata and controls

57 lines (39 loc) Β· 1.34 KB

Windows Subsystem for Linux

How to install WSL2?

winget does not support it, run as follows

How to open current directory in WSL2 with Windows Explorer?

In WSL shell

explorer.exe .

How to move on Windows folder from WSL2?

z "$(wslpath 'G:\GoogleDrive')"

Login shell has been broken in WSL2

wsl --user root

Setup NixOS on WSL2

Use NixOS.
You should remember that does not have /etc/nixos/hardware-configuration.nix and the default username is nixos.

wsl.exe --install --no-distribution
curl -OL "https://github.com/nix-community/NixOS-WSL/archive/refs/heads/release-26.05.tar.gz"
wsl.exe --import NixOS $env:USERPROFILE\NixOS\ nixos-wsl.tar.gz
wsl.exe --distribution "NixOS"
sudo nix-channel --update

Setup Ubuntu on WSL2

wsl.exe --install "Ubuntu-26.04"
wsl.exe --distribution "Ubuntu-26.04"

Setup nix and activate home-manager as written in README with user@wsl-ubuntu

Disable cgroup v1 as putting .wslconfig and restart for setting up podman

winit-conf.exe generate -path=windows/WSL/.wslconfig  > %UserProfile%\.wslconfig
wsl.exe --shutdown