ErrorMitigation / docs /network.md
Dvirmor100's picture
docs(llm,network): Added docs for ollama install and running and networking problems with WSL2 on Windows
65e80b8
|
Raw History Blame Contribute Delete
1.23 kB

Accessing Network Applications with WSL

This guide details how to access network applications using the Windows Subsystem for Linux (WSL) by mirroring the network configuration. This method allows you to use localhost to connect seamlessly between Windows and WSL.

Step 1: Create a WSL Configuration File

To configure network mirroring in WSL, you need to create a .wslconfig file in your home directory.

  1. Open File Explorer: Paste %UserProfile% in the address bar to navigate to your home directory.
  2. Create the File: Right-click in the folder, select "New > Text Document," and name the file .wslconfig.

Configure the File

Copy and paste the following content into the .wslconfig file:

[wsl2]
networkingMode=mirrored

Step 2: Restart WSL

For the changes to take effect, you need to restart the WSL virtual machine.

Open a Command Prompt or PowerShell window and execute the following commands:

# Shut down WSL
wsl --shutdown

# Start WSL
wsl

Further Information

For additional details and advanced settings, refer to the official WSL Networking documentation:

WSL Networking Documentation