{"id":6205,"date":"2026-09-11T22:36:49","date_gmt":"2026-09-11T13:36:49","guid":{"rendered":"https:\/\/eternalsphere.net\/echoes\/?p=6205"},"modified":"2026-09-12T17:18:08","modified_gmt":"2026-09-12T08:18:08","slug":"ytgvqeq14csorx2","status":"publish","type":"post","link":"https:\/\/blog.eternalsphere.net\/index.php\/2026\/09\/11\/ytgvqeq14csorx2\/","title":{"rendered":"Common PowerShell Commands for Managing WSL on Windows"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Windows Subsystem for Linux (WSL) allows Linux distributions to run directly on Windows while remaining easy to control from PowerShell. For routine administration, most operations can be completed with the built-in <code>wsl<\/code> command without opening the Linux environment first.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This article collects the PowerShell commands that are most useful for starting, stopping, inspecting, updating, and troubleshooting WSL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Starting WSL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The simplest command is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This launches the default Linux distribution using its default user.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">One detail is worth noting: WSL normally inherits the <strong>current Windows working directory<\/strong>. For example, if PowerShell is currently inside a Windows user directory, WSL may start under a path such as:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/mnt\/c\/Users\/...\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">To start directly in the Linux user&#8217;s home directory instead, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl ~\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft officially supports <code>~<\/code> for this purpose.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For interactive use, <code>wsl ~<\/code> is often more convenient than plain <code>wsl<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Listing Installed Distributions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To see all installed WSL distributions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --list\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -l\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For more useful information, including whether each distribution is running and whether it uses WSL 1 or WSL 2:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --list --verbose\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The shorter form is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -l -v\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Typical output resembles:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <code> NAME             STATE           VERSION\n* Ubuntu           Running         2\n  Debian           Stopped         2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The <code>*<\/code> marks the default distribution. Microsoft documents <code>-l -v<\/code> as the standard way to inspect installed distributions and their WSL versions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Checking Which Distributions Are Running<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To display only currently running distributions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --list --running\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is especially useful after closing a terminal window, because closing the shell does not necessarily mean that the WSL virtual machine has already stopped.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If everything has stopped, Windows reports that there are no running distributions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This command is also useful when troubleshooting configuration changes or checking whether <code>wsl --shutdown<\/code> succeeded.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Starting a Specific Distribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If multiple distributions are installed, a particular one can be launched with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --distribution &lt;DistributionName&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The short form is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -d &lt;DistributionName&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -d Ubuntu\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The actual distribution names should always be checked first with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -l -v\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This avoids assuming that a distribution has a particular registered name.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Starting WSL as a Specific Linux User<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A distribution can also be started as a particular Linux user:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --user &lt;Username&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example, an administrative shell can be started with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --user root\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A particular distribution and user can be specified together:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --distribution &lt;DistributionName&gt; --user &lt;Username&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft documents both forms as supported ways to select the Linux account used when launching WSL.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Running a Linux Command Directly from PowerShell<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WSL does not have to be opened interactively just to execute one Linux command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl uname -a\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl ls -la\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The command runs inside the default Linux distribution and returns its output directly to PowerShell.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A command can also be directed to a specific distribution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -d &lt;DistributionName&gt; uname -a\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is particularly useful for scripts and quick diagnostics.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Completely Shutting Down WSL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One of the most useful administration commands is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This immediately terminates all running WSL distributions and shuts down the WSL 2 lightweight virtual machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This differs from simply typing:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>exit\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">inside Linux.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>exit<\/code> closes that shell session. It does <strong>not necessarily shut down the entire WSL environment<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore, when the goal is to completely stop WSL, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">It only needs to be executed once.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A useful verification command is:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --list --running\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The combination:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\nwsl --list --running\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">is a quick way to confirm that WSL has fully stopped.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Restarting WSL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WSL does not require a separate <code>restart<\/code> command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A clean restart can be performed with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\nwsl\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or, to start in the Linux home directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\nwsl ~\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This is useful after changing <code>.wslconfig<\/code>, recovering from an abnormal startup, or resetting the WSL 2 virtual-machine environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft specifically describes <code>wsl --shutdown<\/code> as a fast way to restart the WSL 2 environment.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stopping Only One Distribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">If several distributions are running and only one needs to be stopped:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --terminate &lt;DistributionName&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --terminate Ubuntu\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The abbreviated form is also commonly available:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -t Ubuntu\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This terminates only the selected distribution instead of shutting down all of WSL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft distinguishes this from <code>wsl --shutdown<\/code>: <code>--terminate<\/code> targets one distribution, while <code>--shutdown<\/code> stops all distributions and the WSL 2 VM.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Checking WSL Status<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To inspect the general WSL configuration:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --status\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This can show information such as the default distribution, default WSL version, and kernel-related configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">It is one of the first commands worth checking when diagnosing WSL behavior.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Checking the Installed WSL Version<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To display WSL and component versions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --version\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Depending on the installed WSL package, the output may include versions for components such as WSL itself and the Linux kernel. Microsoft documents this separately from <code>wsl --status<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For troubleshooting, these three commands provide a useful overview:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --version\nwsl --status\nwsl -l -v\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Together they show the WSL software version, general configuration, installed distributions, current state, and whether each distribution uses WSL 1 or WSL 2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Updating WSL<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WSL itself can be updated from PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --update\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft documents this as the standard command for updating WSL to the latest available version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After an update, shutting WSL down before starting it again can be useful:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\nwsl\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Setting the Default Distribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When several Linux distributions are installed, the default can be changed with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --set-default &lt;DistributionName&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --set-default Ubuntu\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Afterward, simply running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">launches that distribution by default.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setting the Default WSL Version<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To make newly installed distributions use WSL 2 by default:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --set-default-version 2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Existing distributions are not automatically converted by this command.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To change an existing distribution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --set-version &lt;DistributionName&gt; 2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Conversion between WSL 1 and WSL 2 can take considerable time, especially for large distributions, so Microsoft recommends backing up important data before performing such a conversion.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Checking Available Distributions<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To see distributions available for installation:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --list --online\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">or:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl -l -o\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A distribution can then be installed with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --install -d &lt;DistributionName&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Microsoft&#8217;s current WSL tooling also supports:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --install\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">for installing WSL together with the default Linux distribution on supported Windows systems.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Exporting a WSL Distribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WSL provides a built-in backup mechanism.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A distribution can be exported to a TAR archive:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --export &lt;DistributionName&gt; &lt;BackupFile.tar&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --export Ubuntu D:\\Backup\\ubuntu-backup.tar\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This creates a portable snapshot containing the distribution&#8217;s filesystem. Microsoft also supports VHD-based export for WSL 2.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Importing a Distribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">An exported TAR file can be restored or registered as another distribution:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --import &lt;DistributionName&gt; &lt;InstallLocation&gt; &lt;BackupFile.tar&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --import LinuxBackup D:\\WSL\\LinuxBackup D:\\Backup\\linux-backup.tar\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This makes export\/import useful not only for backups but also for moving WSL distributions between storage locations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Removing a Distribution<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A registered distribution can be permanently removed with:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --unregister &lt;DistributionName&gt;\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This command requires particular care.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Unlike <code>--terminate<\/code> or <code>--shutdown<\/code>, <code>--unregister<\/code> <strong>deletes the distribution&#8217;s registered filesystem, installed software, configuration, and user data<\/strong>. Microsoft explicitly warns that the associated data is permanently lost after unregistering the distribution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --terminate Ubuntu\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">means:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Stop Ubuntu.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">while:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --unregister Ubuntu\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">means:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">Delete the Ubuntu WSL instance.<\/p>\n<\/blockquote>\n\n\n\n<p class=\"wp-block-paragraph\">The two commands should never be confused.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Displaying WSL Help<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">When an option needs to be checked directly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --help\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This displays the commands supported by the installed WSL version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Because WSL continues to evolve, <code>wsl --help<\/code> is also useful for checking whether a newer option exists on a particular Windows installation.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">A Practical Command Set<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">For normal daily administration, only a small subset needs to be remembered:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Start the default distribution\nwsl\n\n# Start in the Linux home directory\nwsl ~\n\n# Show installed distributions and their status\nwsl -l -v\n\n# Show only running distributions\nwsl --list --running\n\n# Start a particular distribution\nwsl -d &lt;DistributionName&gt;\n\n# Start as a particular Linux user\nwsl -u &lt;Username&gt;\n\n# Stop one distribution\nwsl --terminate &lt;DistributionName&gt;\n\n# Completely shut down WSL\nwsl --shutdown\n\n# Check WSL configuration\nwsl --status\n\n# Check WSL version\nwsl --version\n\n# Update WSL\nwsl --update\n\n# Show available commands\nwsl --help\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Among these, the most useful troubleshooting sequence is often simply:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --shutdown\nwsl\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If WSL exhibits an abnormal startup, networking problem, stale configuration, or temporary virtual-machine state, this performs a clean restart without rebooting Windows.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WSL Commands and PowerShell Commands Are Different<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">One conceptual distinction helps avoid confusion.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When entered in PowerShell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">is a Windows-side command that launches or controls WSL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After entering the Linux shell:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>systemctl status\njournalctl\nip addr\nps aux\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">are Linux-side commands executed inside the distribution.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If a WSL management command needs to be invoked <strong>from inside Linux<\/strong>, Microsoft documents using the Windows executable name:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl.exe --status\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">rather than simply:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl --status\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This distinction becomes particularly useful when switching frequently between PowerShell and Bash.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">WSL can be managed almost entirely from PowerShell without interacting with Windows services or manually controlling its underlying virtual machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For routine use, four commands cover most situations:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>wsl\nwsl -l -v\nwsl --shutdown\nwsl --status\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><code>wsl<\/code> starts the Linux environment, <code>wsl -l -v<\/code> shows what exists and what is running, <code>wsl --shutdown<\/code> cleanly resets the entire WSL environment, and <code>wsl --status<\/code> provides a quick configuration overview.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For systems that use WSL regularly, knowing these commands makes starting, stopping, inspecting, and recovering WSL considerably simpler while avoiding unnecessary Windows reboots.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Windows Subsystem for Linux (WSL) allows Linux distributions to run directly on Windows while remaining easy to control from PowerShell. For routine administration, most operations can be completed with the built-in wsl command without opening the Linux environment first. This article collects the PowerShell commands that are most useful for &hellip;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[218],"tags":[271,229],"class_list":["post-6205","post","type-post","status-publish","format-standard","hentry","category-windows","tag-powershell","tag-wsl"],"_links":{"self":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts\/6205","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/comments?post=6205"}],"version-history":[{"count":1,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts\/6205\/revisions"}],"predecessor-version":[{"id":6206,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/posts\/6205\/revisions\/6206"}],"wp:attachment":[{"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/media?parent=6205"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/categories?post=6205"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.eternalsphere.net\/index.php\/wp-json\/wp\/v2\/tags?post=6205"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}