Skip to content

Instantly share code, notes, and snippets.

@yucellmustafa
Last active May 26, 2024 00:55
Show Gist options
  • Save yucellmustafa/b3a5c7739f9dfec89a1a3296795b20e9 to your computer and use it in GitHub Desktop.
Save yucellmustafa/b3a5c7739f9dfec89a1a3296795b20e9 to your computer and use it in GitHub Desktop.
fedora install for wsl

1 - Installed Terminal and WSL GUI

2 - Actived WSL and Virtual Machine on Powershell (administrator)

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux,VirtualMachinePlatform -All

--- RESTART PC ---

3 - wsl --set-default-version 2

4 - Download Fedora Base and extract layer.tar

5 - wsl --import Fedora <path> layer.tar

6 - wsl --setdefault Fedora

#!/bin/bash
# packages
echo -e "fastestmirror=True
max_parallel_downloads=10
defaultyes=True
install_weak_deps=False" | sudo tee -a /etc/dnf/dnf.conf
dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm -y
dnf install @Core bash-completion nano htop python-is-python3 neofetch -y
# user
useradd -G wheel yucellmustafa
passwd yucellmustafa
echo -e "[user]
default = yucellmustafa
[boot]
systemd=true" | sudo tee -a /etc/wsl.conf
@yucellmustafa
Copy link
Author

yucellmustafa commented May 25, 2024

C:\Users<UserName>.wslconfig

[wsl2]
processors=12
memory=24GB
swap=32GB

https://learn.microsoft.com/en-us/windows/wsl/wsl-config

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