<?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: Karthik Natarajan</title>
    <description>The latest articles on DEV Community by Karthik Natarajan (@karthik_natarajan_c2f1f18).</description>
    <link>https://dev.to/karthik_natarajan_c2f1f18</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%2F3371493%2F761feaa5-864c-47b2-b520-42d7dcea4aa2.jpg</url>
      <title>DEV Community: Karthik Natarajan</title>
      <link>https://dev.to/karthik_natarajan_c2f1f18</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/karthik_natarajan_c2f1f18"/>
    <language>en</language>
    <item>
      <title>From Linux and macOS to WSL: Setting Up a Dev Environment on Windows</title>
      <dc:creator>Karthik Natarajan</dc:creator>
      <pubDate>Sun, 20 Jul 2025 07:20:30 +0000</pubDate>
      <link>https://dev.to/karthik_natarajan_c2f1f18/from-linux-and-macos-to-wsl-setting-up-a-dev-environment-on-windows-1783</link>
      <guid>https://dev.to/karthik_natarajan_c2f1f18/from-linux-and-macos-to-wsl-setting-up-a-dev-environment-on-windows-1783</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Coming from use of Linux distributions and macOS, I was not familiar with PowerShell commands or Windows management. I had a Windows desktop and wanted to use it without dual booting and extra partitions. I explored Windows Subsystem for Linux (WSL).&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Chose WSL
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;No dual boot. I wanted to avoid complexity and resource overhead of a second Linux installation.&lt;/li&gt;
&lt;li&gt;Native Linux tools on Windows. WSL allows running a Linux environment on Windows.&lt;/li&gt;
&lt;li&gt;File system integration. WSL mounts Windows drives under &lt;code&gt;/mnt&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting Up WSL with Ubuntu
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Installation:&lt;/strong&gt; I set up WSL with Ubuntu using Microsoft Store.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Drive mapping:&lt;/strong&gt; In WSL, under &lt;code&gt;/mnt&lt;/code&gt;, I accessed Windows drives.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Working with Cursor and Centralized Projects
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Editor setup:&lt;/strong&gt; I use Cursor and point it to Ubuntu WSL filesystem.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Cloud syncing:&lt;/strong&gt; I placed projects in a OneDrive folder to switch machines. My WSL environment syncs via OneDrive.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Integrating Docker Desktop with WSL
&lt;/h2&gt;

&lt;p&gt;An aspect of dev work is Docker. Here is how I set up Docker Desktop for use with WSL.&lt;/p&gt;

&lt;h3&gt;
  
  
  Enabling WSL 2 and Docker Integration
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Set WSL 2 as default backend:&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;  wsl &lt;span class="nt"&gt;--set-default-version&lt;/span&gt; 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Configure Docker Desktop:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;Open Docker Desktop and go to &lt;strong&gt;Settings &amp;gt; General&lt;/strong&gt;. Enable &lt;strong&gt;Use WSL 2 based engine&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;In &lt;strong&gt;Settings &amp;gt; Resources &amp;gt; WSL Integration&lt;/strong&gt;, enable integration for your WSL distributions. Use the toggle next to the distribution.&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Apply &amp;amp; Restart&lt;/strong&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Where to Find It&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;WSL 2 Backend&lt;/td&gt;
&lt;td&gt;Settings &amp;gt; General&lt;/td&gt;
&lt;td&gt;Linux compatibility&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;WSL Integration&lt;/td&gt;
&lt;td&gt;Settings &amp;gt; Resources &amp;gt; WSL Integration&lt;/td&gt;
&lt;td&gt;Docker commands accessible in WSL distros&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  Docker Group Permissions
&lt;/h2&gt;

&lt;p&gt;If you have permission issues with Docker, make sure your WSL user is in the &lt;code&gt;docker&lt;/code&gt; group.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Open Ubuntu terminal in WSL.&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;usermod &lt;span class="nt"&gt;-aG&lt;/span&gt; docker &lt;span class="nv"&gt;$USER&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Log out and back in or run:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;newgrp docker
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Check permissions:&lt;br&gt;
&lt;/p&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;ls&lt;/span&gt; &lt;span class="nt"&gt;-l&lt;/span&gt; /var/run/docker.sock
&lt;/code&gt;&lt;/pre&gt;


&lt;p&gt;The group owner should be &lt;code&gt;docker&lt;/code&gt; and group should have write permissions.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This allows Docker commands without &lt;code&gt;sudo&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;This approach let me work in a Linux environment on Windows, with Docker support. &lt;/p&gt;

</description>
      <category>cursor</category>
      <category>docker</category>
      <category>linux</category>
      <category>microsoft</category>
    </item>
  </channel>
</rss>
