How to Change Your Default Distro in WSL

Changing the default Windows Subsystem for Linux (WSL) distribution is simple. This guide shows you how to list your installed distros and set a new default using just a couple of commands.

1. Listing Installed WSL Distributions

Before setting a new default, check which distributions are installed on your system. Open a terminal and run:

# show installed wsl distros
wsl -l -v

This command lists all installed WSL distributions along with their version numbers. Take note of the exact name of the distribution you want to set as the default.

2. Changing the Default WSL Distro

Once you have identified the distro you want to use as the default, run the following command:

# set default wsl distro
wsl -s <wsl-distribution-name>

Replace <distro-name> with the name of your preferred default distribution.

change wsl default distro

In my example above, I’m setting Debian as the default distro and then when I enter that WSL Debian, I’m running cat /etc/os-release to verify what Linux flavor I’m running.

That’s it, you’ve now set your default WSL distribution! For more random WSL tips, feel free to check out my other WSL Blog posts.


Recent Posts
Categories
Tags

Always On Availability Groups (AAG) (4) AWS (4) AWS Redshift (6) Certificates & Encryption (3) Change Data Capture (CDC) (2) Database Admin (72) Database Backups & Recovery (14) Database Mirroring (2) Deleting Data (1) Error Messages (5) Git Commands (6) Importing & Exporting Data (2) Linked Servers (3) Linux Admin (2) Logging & Monitoring (1) Measuring Databases (10) Microsoft Patching (2) MySQL (4) Postgres (6) PowerShell Scripts (1) SQL Server Agent (5) SQL Server Database Files (1) SQL Server Data Types (2) SQL Server Management Studio (SSMS) (15) SQL Server Network Connectivity (3) SQL Server on Linux (1) SQL Server Patching (2) SQL Server Performance (6) SQL Server Permissions (2) SQL Server Processes (SPIDs) (7) SQL Server Replication (2) SQL Server Scripts (13) Windows Admin (21) Windows Authentication (2) Windows Automation (1) Windows Events (2) Windows Firewall (4) Windows Subsystem for Linux (WSL) (18)