<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: IYAC TECHNOLOGIES</title>
    <description>The latest articles on DEV Community by IYAC TECHNOLOGIES (@iyac_technologies_d27014a).</description>
    <link>https://dev.to/iyac_technologies_d27014a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3065000%2Fe1c50fa5-f55f-4337-9eb6-69f9aadbecca.png</url>
      <title>DEV Community: IYAC TECHNOLOGIES</title>
      <link>https://dev.to/iyac_technologies_d27014a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/iyac_technologies_d27014a"/>
    <language>en</language>
    <item>
      <title>Setting up WSL Ubuntu on your Windows Machine (Laptops| PCs)</title>
      <dc:creator>IYAC TECHNOLOGIES</dc:creator>
      <pubDate>Sat, 19 Apr 2025 09:58:34 +0000</pubDate>
      <link>https://dev.to/iyac_technologies_d27014a/setting-up-wsl-ubuntu-on-your-windows-machine-laptops-pcs-4597</link>
      <guid>https://dev.to/iyac_technologies_d27014a/setting-up-wsl-ubuntu-on-your-windows-machine-laptops-pcs-4597</guid>
      <description>&lt;p&gt;Today will be slightly technical than my previous post, so brace yourself.&lt;/p&gt;

&lt;p&gt;I know many of us often work with both Windows and Linux. For a long time, I used Vagrant and VirtualBox to set up my Ubuntu environment for coding projects. It was a very convenient setup; I could carry out all my Linux tasks and run my servers without any issues.&lt;/p&gt;

&lt;p&gt;However, one day, I ran into problems. Vagrant simply stopped working. I tried troubleshooting it repeatedly, but nothing seemed to fix it. I decided to switch back to using WSL.&lt;/p&gt;

&lt;p&gt;**WSL(Windows Subsystem for Linux) **allows you to run a Linux environment, like Ubuntu, directly within Windows. It seems great in theory, right? But when I tried to set it up, I encountered another problem: I couldn't get the internet to work in my Ubuntu installation! This was a major setback.&lt;/p&gt;

&lt;p&gt;You know how crucial internet access is for a developer. How do you download packages, or push your code? I was in a difficult situation. I consulted ChatGPT and read numerous blog posts, and it was a very frustrating experience.&lt;/p&gt;

&lt;p&gt;Eventually, I found the solution in a Reddit thread. I have to give credit to that person! They suggested installing a tool called wsl-vpnkit. I followed the instructions provided, step by step, and finally, the internet connection was restored.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Initial Setup:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install WSL1 (Optional)&lt;/strong&gt;: You might encounter fewer initial issues by first installing Ubuntu with WSL1. Open PowerShell as an Administrator and type in wsl --install to install Ubuntu. If you don't encounter issues, you can skip to the next step.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Install Ubuntu&lt;/strong&gt;: If you haven't already, install Ubuntu from the Microsoft Store.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Upgrade to WSL2&lt;/strong&gt;: Checkout the official documentation &lt;em&gt;&lt;a href="https://learn.microsoft.com/en-us/windows/wsl/install" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/windows/wsl/install&lt;/a&gt;&lt;/em&gt; .... I observed from several installation that install WSL1 then upgrading to WSL2 saves one the stress of unnecessary troubleshooting but if install WSL2 works out for you at first trail....fine&lt;/p&gt;

&lt;p&gt;Resolving Internet Connectivity Issues:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Download wsl-vpnkit&lt;/strong&gt;: Download the wsl-vpnkit.tar.gz file from the GitHub releases page. The download link is: &lt;code&gt;https://github.com/sakai135/wsl-vpnkit/releases/tag/v0.4.1&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Import wsl-vpnkit&lt;/strong&gt;: Open PowerShell and import the downloaded file as a new WSL distribution using the command&lt;br&gt;
&lt;code&gt;wsl --import wsl-vpnkit --version 2 $env:USERPROFILE\wsl-vpnkit C:\Users\user\Downloads\wsl-vpnkit.tar.gz&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Remember to replace the path in the command with the actual location of your downloaded file.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Run wsl-vpnkit: To establish the internet connection, open a separate PowerShell window and run the command below on the terminal&lt;br&gt;
&lt;code&gt;wsl-vpnkit&lt;/code&gt;&lt;br&gt;
&lt;em&gt;Keep this PowerShell window open in the background.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Optimizing VSCode Connection:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Speed Up VSCode Connection&lt;/strong&gt;: To improve VSCode's connection speed to WSL, open a separate PowerShell terminal.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Run 'wsl' in PowerShell&lt;/strong&gt;: In that PowerShell terminal, simply type the &lt;code&gt;wsl&lt;/code&gt;and press Enter. Leave this terminal open.&lt;br&gt;
&lt;em&gt;This action seems to pre-initialize WSL, allowing VSCode to connect more quickly.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Connect VSCode&lt;/strong&gt;: Now, try connecting VSCode to your WSL Ubuntu environment. The connection should be noticeably faster, without the usual long loading times.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Internet Issues in VSCode/WSL&lt;/strong&gt;: If you still experience internet connectivity problems within VSCode or your WSL Ubuntu environment, open another PowerShell terminal.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Run wsl-vpnkit (with --cd) *&lt;/em&gt;: In this new PowerShell terminal, run the command:&lt;br&gt;
&lt;code&gt;wsl.exe -d wsl-vpnkit --cd /app wsl-vpnkit&lt;/code&gt;&lt;br&gt;
&lt;code&gt;This ensures that wsl-vpnkit is running correctly and that the network connection is properly bridged. Keep this terminal open.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
WSL is increasingly important in &lt;strong&gt;DevOps and Cloud Computing&lt;/strong&gt; because it:&lt;/p&gt;

&lt;p&gt;Bridges Windows and Linux environments, crucial for heterogeneous setups.&lt;/p&gt;

&lt;p&gt;Streamlines development with Windows IDEs and Linux tools, replacing dual-booting/VMs.&lt;/p&gt;

&lt;p&gt;Enables consistent, portable, Linux-based environments mirroring production.&lt;/p&gt;

&lt;p&gt;Improves automation using Linux tools on Windows.&lt;/p&gt;

&lt;p&gt;Facilitates cloud adoption with Docker and Kubernetes (especially WSL 2).&lt;/p&gt;

&lt;p&gt;Offers cost-effectiveness by reducing the need for separate Linux machines.&lt;/p&gt;

&lt;p&gt;Boosts productivity by allowing developers to use preferred tools on either OS.&lt;/p&gt;

&lt;p&gt;WSL enhances efficiency, productivity, and adaptability for DevOps teams, supporting cloud adoption with a consistent and portable development environment.&lt;/p&gt;

&lt;p&gt;By following these steps, you should have a fully functional WSL Ubuntu setup with internet access, and VSCode should connect to it quickly and reliably.&lt;/p&gt;

</description>
      <category>wsl</category>
      <category>devops</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
