https://github.com/franckferman/fix_wsl2_networking
Solve connection problems related to WSL2.
https://github.com/franckferman/fix_wsl2_networking
bash-prompt bash-scripts debian-linux dns networkingtool networks shell-scripting shell-scripts windows-10 windows-11 windows10 windows11 wsl-debian wsl-fix wsl-kali wsl-network wsl-ubuntu wsl2 wsl2-fix wsl2-network
Last synced: 10 months ago
JSON representation
Solve connection problems related to WSL2.
- Host: GitHub
- URL: https://github.com/franckferman/fix_wsl2_networking
- Owner: franckferman
- License: agpl-3.0
- Created: 2022-03-13T14:58:34.000Z (almost 4 years ago)
- Default Branch: stable
- Last Pushed: 2025-03-08T19:14:46.000Z (11 months ago)
- Last Synced: 2025-04-09T18:12:35.244Z (10 months ago)
- Topics: bash-prompt, bash-scripts, debian-linux, dns, networkingtool, networks, shell-scripting, shell-scripts, windows-10, windows-11, windows10, windows11, wsl-debian, wsl-fix, wsl-kali, wsl-network, wsl-ubuntu, wsl2, wsl2-fix, wsl2-network
- Language: Shell
- Homepage: https://github.com/franckferman/fix_wsl2_networking/blob/main/README.md
- Size: 308 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![Contributors][contributors-shield]](https://github.com/franckferman/fix_wsl2_networking/graphs/contributors)
[![Stargazers][stars-shield]](https://github.com/franckferman/fix_wsl2_networking/stargazers)
[![License][license-shield]](https://github.com/franckferman/fix_wsl2_networking/blob/stable/LICENSE)
fix_wsl2_networking
Solve connection problems related to WSL2.
## ๐ Table of Contents
Click to collapse/expand
## ๐ About
This script provides a permanent fix for a persistent issue affecting WSL2 users on various Linux distributions, including Debian, Ubuntu, and Kali.
Many users attempt temporary configuration tweaks, only to find the problem recurring. This script eliminates the hassle by offering a reliable, long-term solution that works seamlessly.
If you've been struggling with this issue, or know someone who is, this script is the definitive fix you've been looking for.
### Tested On
This script has been successfully tested on multiple WSL2 environments, including:
* - [x] [Debian](https://www.microsoft.com/en-us/p/debian/9msvkqc78pk6)
* - [x] [Ubuntu](https://www.microsoft.com/en-us/p/ubuntu/9pdxgncfsczv)
* - [x] [Kali Linux](https://www.microsoft.com/en-us/p/kali-linux/9pkr34tncv07)
## ๐ฎ Getting Started
This repository is dedicated to fixing Internet connectivity issues in WSL2 when using a Linux distribution.
๐ Note: This guide does not cover WSL2 installation or setupโonly the networking fix.
My goal is to provide a reliable and efficient solution to help WSL2 users restore network connectivity and optimize their workflow.
### Prerequisites
Download the script directly via PowerShell:
```PowerShell
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/franckferman/fix_wsl2_networking/stable/fix_wsl2_networking.sh" -OutFile "C:\Users\$env:UserName\fix_wsl2_networking.sh"
```
## Usage
1๏ธโฃ Move & execute the script from your Linux terminal in WSL2:
```sh
cd ~&&mv /mnt/c/Users/Your_Windows_UserName/fix_wsl2_networking.sh .&&chmod +x ./fix_wsl2_networking.sh&&sudo ./fix_wsl2_networking.sh
```
2๏ธโฃ Once the script completes, your connectivity issues should be resolved.
## ๐ License
This project is licensed under the GNU Affero General Public License, Version 3.0. For more details, please refer to the LICENSE file in the repository: [Read the license on GitHub](https://github.com/franckferman/fix_wsl2_networking/blob/stable/LICENSE)
## ๐ Contact
[![ProtonMail][protonmail-shield]](mailto:contact@franckferman.fr) [![LinkedIn][linkedin-shield]](https://www.linkedin.com/in/franckferman)
[contributors-shield]: https://img.shields.io/github/contributors/franckferman/fix_wsl2_networking.svg?style=for-the-badge
[contributors-url]: https://github.com/franckferman/fix_wsl2_networking/graphs/contributors
[stars-shield]: https://img.shields.io/github/stars/franckferman/fix_wsl2_networking.svg?style=for-the-badge
[stars-url]: https://github.com/franckferman/fix_wsl2_networking/stargazers
[license-shield]: https://img.shields.io/github/license/franckferman/fix_wsl2_networking.svg?style=for-the-badge
[license-url]: https://github.com/franckferman/fix_wsl2_networking/blob/stable/LICENSE
[protonmail-shield]: https://img.shields.io/badge/ProtonMail-8B89CC?style=for-the-badge&logo=protonmail&logoColor=blueviolet
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=blue