Run linux commands in windows

 Setup and Configure WSL with Apache Over LAN

🔹 Step 1: Install WSL on Windows

        Open PowerShell as Administrator and run:(This installs Ubuntu (default distro).)

        wsl --install

2️⃣ Restart your PC and open WSL Terminal:

        wsl

🔹 Step 2: Install Apache in WSL and restart apache

        sudo apt update && sudo apt install apache2 -y

        sudo service apache2 start

🔹 Step 3: Find WSL IP Address

        ip addr show eth0 | grep 'inet '


🔹 Step 4: Make Apache Accessible Over LAN

        Run the following in PowerShell (Admin):

        netsh interface portproxy add v4tov4 listenaddress=0.0.0.0 listenport=80 connectaddress=172.18.92.1 connectport=80

         netsh advfirewall firewall add rule name="Allow WSL Apache" dir=in action=allow protocol=TCP localport=80

            (IReplace 172.18.92.1 with your WSL IP)

    Now, any LAN device can access Apache via:

        http://192.168.1.100   # Replace with your Windows IP