How to Upgrade WSL from Version 1 to Version 2

This guide explains how to upgrade your Windows Subsystem for Linux (WSL) distribution from Version 1 (WSL 1) to Version 2 (WSL 2).

WSL supports two versions: the original WSL 1 and the more advanced WSL 2. You can install multiple Linux distributions on your system and easily switch their WSL versions. Upgrading to WSL 2 is recommended for most users as it offers better performance and additional features.

If you’re unsure which WSL version your system is using, refer to my guide How to Check Installed WSL Versions. For users looking to downgrade from WSL 2 to WSL 1 instead, see my post How to Downgrade from WSL Version 2 to WSL Version 1.

Steps to Upgrade WSL 1 to WSL 2

1. Open a terminal and run wsl -l -v to list all installed WSL distributions and their versions.

2. Identify the distribution you want to upgrade. For example, if the distribution is named Debian, use the following command to upgrade it to WSL 2:

# check wsl distro versions
wsl -l -v

# change wsl distro using name above to desired version
wsl --set-version Debian 2
WSL Upgrade

The upgrade will be applied immediately, and the selected distribution will now run on WSL 2.

If you need to switch back to WSL 1, simply replace the 2 with a 1 in the --set-version command.

Hope this guide was what you needed. Feel free to browse around for more tips like this.


Recent Posts
Categories
Tags

Always On Availability Groups (AAG) (4) AWS (4) AWS Redshift (6) Database Admin (72) Database Backups & Recovery (14) Database Mirroring (2) Error Messages (5) Failover Cluster Instances (FCI) (1) Git Commands (6) Importing & Exporting Data (2) Linked Servers (3) Linux Administration (2) Logging & Monitoring (1) Microsoft Patching (2) MySQL (4) Postgres (6) PowerShell Scripts (2) SQL Certificates & Encryption (3) SQL Server Agent (5) SQL Server CDC (2) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (16) SQL Server Networking (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance Tuning (6) SQL Server Processes (SPIDs) (7) SQL Server Replication (2) SQL Server Scripts (13) SQL Server Security (4) SQL Server Storage (10) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (18)