Running Expo in Windows Subsystem for Linux (WSL2)
<p>If it runs in Node.js, it can run Expo. Even better, if it runs in Linux, you can take advantage of all the excellent React Native tools that may not be utilizing cross-platform utilities like <code>cross-env</code>. Since Windows 10 has support for Linux through a virtualized Windows Subsystem for Linux (WSL2), we can use that to run our Expo applications, build tooling, and more.</p>
<p>Getting everything working on WSL2 <em>does</em> have a few gotchas, which is why this guide can help you get up and running quickly and avoid some of the most common pitfalls (spoiler: it’s networking related).</p>
<h1>Overview</h1>
<ul>
<li>Setting up WSL2</li>
<li>Configuring <code>WSLHostPatcher</code></li>
<li>Alternative: Using Windows Firewall Rules</li>
<li>Final considerations</li>
</ul>
<h1>Setting up WSL2 for Expo Development</h1>
<p>WSL2 gives you access to a fully featured Linux command line inside of Windows. While great cross-platform tools like <code>env-cmd</code> exist, not every tool we use in React Native development is Powershell-aware. Using WSL2 eliminates those problems entirely; it’s just Linux. Unless specified, all our commands will be in WSL2’s Linux environment.</p>
<p><a href="https://blog.expo.dev/running-expo-in-windows-subsystem-for-linux-wsl2-425f6fd7838e"><strong>Click Here</strong></a></p>