<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Aaditya Singh]]></title><description><![CDATA[Aaditya Singh]]></description><link>https://blog.aadityasingh.dev</link><generator>RSS for Node</generator><lastBuildDate>Wed, 29 Apr 2026 13:08:50 GMT</lastBuildDate><atom:link href="https://blog.aadityasingh.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[How to setup WSL in Windows?]]></title><description><![CDATA[Introduction
Windows Subsystem for Linux (WSL) is a feature of Windows that allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booti]]></description><link>https://blog.aadityasingh.dev/how-to-setup-wsl-in-windows</link><guid isPermaLink="true">https://blog.aadityasingh.dev/how-to-setup-wsl-in-windows</guid><category><![CDATA[WSL]]></category><category><![CDATA[Windows]]></category><dc:creator><![CDATA[Aaditya Singh]]></dc:creator><pubDate>Thu, 05 Mar 2026 04:00:00 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/68836bd20851784e4674b062/7b97cecc-df5d-4703-a6fc-a35eef2d5c70.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h2>Introduction</h2>
<p>Windows Subsystem for Linux (WSL) is a feature of Windows that allows you to run a Linux environment on your Windows machine, without the need for a separate virtual machine or dual booting.</p>
<p>The primary reason for developing WSL, according to Microsoft, was to allow developers who were using open-source tools to keep developing on Windows.</p>
<p>WSL offers numerous benefits over native windows operating system such as --</p>
<ul>
<li><p><strong>Linux environment on Windows</strong> – Use native Linux tools (<code>bash</code>, <code>apt</code>, Docker, Git) without dual-booting or virtual machines.</p>
</li>
<li><p><strong>Lightweight and fast</strong> – Consumes far fewer resources than traditional VMs while delivering near-native performance.</p>
</li>
<li><p><strong>Cross-Platform Development</strong> – With WSL, you can access the Windows file system from Linux &amp; call Windows executables from Linux, or vice versa.</p>
</li>
<li><p><strong>Enhanced VS Code Integration</strong> – The WSL extension lets you edit Linux files directly in VS Code and run commands in an integrated terminal—no context switching between Windows and Linux environments.</p>
</li>
<li><p><strong>Cost-Effective Solution</strong> – Unlike virtual machines that require extra resources and licensing, WSL runs natively on Windows at zero additional cost.</p>
</li>
</ul>
<h2>Step-by-Step Guide</h2>
<h3>Step 1: Open Windows PowerShell as Administrator</h3>
<p>Run this command.</p>
<pre><code class="language-shell">## By default, it'll install Ubuntu
wsl --install
## To install a specific Linux Distro
wsl --install &lt;distro_name&gt;
## To install Debian
wsl --install Debian
</code></pre>
<p>You can see the list of available WSL distros by running this command.</p>
<pre><code class="language-shell">wsl --list --online
</code></pre>
<h3>Step 2: Set username &amp; password for your WSL distro</h3>
<p>After the installation is successful, it'll prompt you to create a username &amp; password for your distro. Provide a suitable username &amp; password.</p>
<p>After successful setup, you'll be automatically inside WSL.</p>
<img src="https://cdn.hashnode.com/uploads/covers/68836bd20851784e4674b062/f8241378-b967-4d44-a08f-f9e76a423e82.jpg" alt="" style="display:block;margin:0 auto" />

<p>Now, you can start to run commands here just like inside a Linux operating system.</p>
<h3>Step 3: Launch WSL from Windows PowerShell</h3>
<p>Now whenever you want to re-enter WSL, run this command in your Windows PowerShell.</p>
<pre><code class="language-shell">wsl -d &lt;distro_name&gt;
## For ubuntu
wsl -d ubuntu
</code></pre>
<p>To set Ubuntu as your default WSL distro, run this command.</p>
<pre><code class="language-shell">wsl --set-default &lt;distro_name&gt;
## To set ubuntu as default
wsl --set-default Ubuntu
</code></pre>
<h2>How to exit WSL?</h2>
<p>To exit the WSL environment, you can run these commands --</p>
<p><code>exit</code> -&gt; Ends current shell session.<br /><code>logout</code> -&gt; Similar to <code>exit</code>, logs out of the shell.<br /><code>Ctrl + D</code> -&gt; Keyboard shortcut for <code>exit</code>.</p>
<p>These closes the current shell session but does not stop the WSL instance if other processes are running.</p>
<p>To gracefully shutdown all the running WSL instances, use this command.</p>
<pre><code class="language-shell">## From Windows PowerShell
wsl --shutdown

## Inside WSL
wsl.exe --shutdown
</code></pre>
<h2>Limitations of WSL</h2>
<p>While WSL has lots of upsides, it has some downsides too --</p>
<ul>
<li><p><strong>GUI Support Limitations</strong> – WSL does not support full GUI applications as well as a native Linux installation, which may be a drawback for users who rely heavily on GUIs.</p>
</li>
<li><p><strong>File System Performance Issues</strong> – Accessing Windows files from WSL is significantly slower than native Linux file operations, impacting build times and file-heavy workflows.</p>
</li>
<li><p><strong>Performance Limitations</strong> – While WSL is faster than native windows for everyday use, it can be noticeably slower than native Linux, especially for resource-intensive applications.</p>
</li>
<li><p><strong>Memory Issues in WSL</strong>– When using WSL, you might encounter memory issues where WSL consumes a significant amount of RAM or runs out of memory.</p>
</li>
</ul>
<h2>Conclusion</h2>
<p>WSL is excellent for development and CLI tools, but falls short for hardware-dependent tasks, GUI applications, performance-critical workflows, and resource-constrained machines. For those use cases, dual-boot or native Linux still remains superior.</p>
]]></content:encoded></item></channel></rss>