# List available images wsl --list--online # Download Ubuntu 20.04 wsl --install Ubuntu-20.04
Migrate to D Drive
Create a directory on D drive to host the new WSL, e.g. D:\WSL\Ubuntu-20.04:
1 2 3 4 5 6 7
# 1. Export a backup (e.g. named Ubuntu.tar) wsl --export Ubuntu-20.04 D:\WSL\Ubuntu-20.04.tar # 2. Unregister the original wsl --unregister Ubuntu-20.04 # 3. Restore the backup to D:\WSL\Ubuntu-20.04 wsl --import Ubuntu-20.04 D:\WSL\Ubuntu-20.04 D:\WSL\Ubuntu-20.04.tar # You can now delete Ubuntu-20.04.tar
If WSL appears to start normally after this but the user has become root, restore with:
make -j$(nproc) sudo make install # After build, verify: should output RUNPATH /home/zhaohang/repository/tree-sitter/_install/lib objdump -p /usr/local/bin/emacs | grep RUNPATH
--without-x: emacs-nox, no X11 (Xorg), terminal-only (emacs -nw)
--without-ns: disable macOS Cocoa/NS window system, just prevents configure from auto-detecting macOS GUI
--without-pgtk: disable Pure GTK (new GUI backend for Wayland)
--with-native-compilation: enable native-comp (.eln), compiles Elisp to machine code