Last active
September 2, 2024 13:42
-
-
Save kmatt/71603170556ef8ffd14984af77ff10c5 to your computer and use it in GitHub Desktop.
Fedora on WSL2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From https://fedoramagazine.org/wsl-fedora-33/ | |
# prompt ">" indicates Powershell commands | |
# https://docs.microsoft.com/en-us/windows/wsl/install-win10 | |
> dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart | |
> dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart | |
# install https://wslstorestorage.blob.core.windows.net/wslblob/wsl_update_x64.msi | |
> wsl --set-default-version 2 | |
# use container image as rootfs from https://github.com/fedora-cloud/docker-brew-fedora/tree/$VERSION/x86_64 | |
# uncompress but do not unzip tar file | |
> wsl.exe --import $DISTRONAME $STORAGEPATH fedora-$VERSION.tar | |
> wsl -d $DISTRONAME | |
$ dnf update | |
$ dnf install wget curl sudo ncurses dnf-plugins-core dnf-utils passwd findutils | |
$ useradd -G wheel $USER | |
$ passwd $USER | |
$ echo -e "[user]\ndefault=$USERNAME" > /etc/wsl.conf | |
# optional wslu utilities | |
$ sudo dnf copr enable wslutilities/wslu | |
$ sudo dnf install -y wslu | |
> wsl -t $DISTRONAME | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment