✳️ Replace the highlighted information with your own
[wsl2]
# Enable mirrored networking mode
networkingMode=mirrored
# Allow Windows Firewall to manage WSL ports
firewall=true
# Limit system resources to prevent freezing (Example: 8GB RAM machine)
memory=4GB
processors=4
[experimental]
# Improve IP mapping and loopback stability
hostAddressLoopback=true
# Automatically reclaim unused RAM from Linux
autoMemoryReclaim=gradual
# Automatically shrink virtual disk size (VHDX)
sparseVhd=true
Parameter Explanation
- networkingMode=mirrored → Use mirrored networking so WSL shares the same LAN as Windows (no NAT, no port forwarding).
- firewall=true → Let Windows Firewall control access to WSL ports (must open ports manually if needed).
- memory=4GB → Limit WSL RAM usage to avoid system lag or freezing.
- processors=4 → Limit the number of CPU cores used by WSL.
- hostAddressLoopback=true → Improve localhost and IP communication between Windows and WSL.
- autoMemoryReclaim=gradual → Automatically release unused RAM back to Windows over time.
- sparseVhd=true → Automatically shrink the virtual disk (VHDX) to save storage space.
Read more
- Top 10 Nodes in n8n: A Comprehensive Guide
- The 15 Best AI Software of 2026
- How to Create a Claude API Key: A Comprehensive Guide
- What is n8n? An Introduction to the Workflow Automation Tool
- pfSense vs OPNsense: A Comprehensive Comparison for 2026
- Understanding OPNsense: The Open-Source Firewall for All Organizations
- Exploring pfSense: A Versatile Open-Source Firewall and Routing Solution
- Understanding WireGuard: The Fast and Secure VPN Protocol
- What is Cloudflare ? Why millions Trust it for Website
- How to Connect Google Drive to Linux using Rclone for Seamless Synchronization