<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>发行版 _ 扒房网</title>
	<atom:link href="https://www.gxjlyf.com/tag/17244/feed" rel="self" type="application/rss+xml" />
	<link>https://www.gxjlyf.com</link>
	<description>手机系统教程_手机软件教程_手机app使用教程_电脑软件教程_电脑系统教程</description>
	<lastBuildDate>Fri, 25 Nov 2022 04:23:11 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>我来教你Windows10如何在WSL中设置默认的Linux发行版</title>
		<link>https://www.gxjlyf.com/855018.html</link>
		
		<dc:creator><![CDATA[bafang18]]></dc:creator>
		<pubDate>Fri, 25 Nov 2022 04:23:11 +0000</pubDate>
				<category><![CDATA[PC教程]]></category>
		<category><![CDATA[发行版]]></category>
		<category><![CDATA[命令]]></category>
		<guid isPermaLink="false">https://www.chuwenyu.com/855018.html</guid>

					<description><![CDATA[Windows10如何在WSL中设置默认的Linux发行版？WSL支持同时安装和使用多种平台的Linux 发行 ...]]></description>
										<content:encoded><![CDATA[<p><strong>Windows10如何在WSL中设置默认的Linux发行版？</strong>WSL支持同时安装和使用多种平台的Linux 发行版，并且可以在不同版本之间进行切换，非常方便。其实我们可以为WSL设置一个默认的Linux 发行版以方便日常使用，下面给大家我来教你具体的操作方法。</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042306-6380432a095b6.jpg" /></p>
<p><strong>前言：</strong></p>
<p>在Windows 10 中安装好不同 Linux 发行版后就可以立即运行多个 Linux 环境。但当你使用 Wsl.exe 或 Bash.exe 命令来启动 Shell 时，或者从 Windows 10 的其它位置运行 wsl ［command］ 或 bash -c ［command］ 命令时，WSL 将使用默认的 Linux 环境，这也就是为什么推荐大家在安装多个 Linux 发行版后要设置默认环境的主要原因。</p>
<p><strong>Windows 10如何设置默认Linux发行版？</strong></p>
<p>1、使用 wslconfig.exe 命令行工具可以直接管理 Windows Subsystem for Linux（WSL）默认运行的 Linux 发行版。</p>
<p>该命令可以直接在「命令提示符」和 Windows PowerShell 中使用。</p>
<p>2、要查看当前 Windows 10 PC 中已安装的 Linux 发行版，可以执行如下命令：</p>
<p>01wslconfig /l复制代码wslconfig /l</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042306-6380432aaaa74.jpg" /></p>
<p>3、在返回结果中以（默认）结尾标示出的即为当前系统的默认 Linux 环境。</p>
<p>要更改默认的 Linux 发行版，请运行以下命令，其中 Name 是 Linux 发行版的名称：</p>
<p>01wslconfig /setdefault Name复制代码wslconfig /setdefault Name</p>
<p>4、例如要将我默认环境由 Ubuntu 切换为 openSUSE Leap 42 由可以执行如下命令：</p>
<p>01wslconfig /setdefault openSUSE-42复制代码wslconfig /setdefault openSUSE-42</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042307-6380432b5672f.jpg" /></p>
<p>5、设置好之后当你再运行 wsl 或 bash 命令时，则会打开已选择好的 Linux 发行版。当使用 wsl ［command］ 或 bash -c ［command］ 运行单个命令时，也会使用默认的 Linux 发行版。</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042308-6380432c01364.jpg" /></p>
<p><strong>如何运行多个Linux发行版？</strong></p>
<p>1、　在 Windows 10 中安装好多套 Linux 发行版之后，即便没将它设置为默认的 Linux 环境，也可以启动使用。例如，用户可以直接在「开始」菜单中找到启动 Ubuntu、openSUSE Leap 和 SUSE Linux Enterprise Server 系统的快捷方式，并同时运行三套独立的环境。</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042308-6380432cb8592.jpg" /></p>
<p>2、如果你没在 Microsoft Store 中选择将 Linux 发行版的快捷方式固定到「开始」菜单，也只需要使用其命令名称即可从命令行或快捷方式启动 Linux 发行版。以下启动三个 Linux 发行版所需的命令：</p>
<p>Ubuntu： ubuntu</p>
<p>openSUSE Leap 42： opensuse-42</p>
<p>SUSE Linux Enterprise Server 12： sles-12</p>
<p>例如，即使 Ubuntu 是你的默认环境，仍然可以通过运行 opensuse-42 命令从任何地方启动 openSUSE。</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042309-6380432d5853b.jpg" /></p>
<p>3、以上指定 Linux 发行版本的快捷命令也可以使用与 bash.exe 一样的 -c 开关，只需使用下面的命令结果即可：</p>
<p>01distro-command -c command复制代码distro-command -c command</p>
<p>4、其中 distro-command 与用于启动 Linu x发行版的命令相同，command 是要运行的 Linux 命令。例如：</p>
<p><img decoding="async" alt="Windows10如何在WSL中设置默认的Linux发行版？" src="https://dz.cwhello.com/wp-content/uploads/2022/11/20221125042310-6380432e0aaae.jpg" /></p>
<p>以上就是Windows10在WSL中设置默认Linux发行版的方法，不懂的伙伴，可以参照教程中的步骤。</p>

<p><img src="https://www.gxjlyf.com/postviews/855018.png" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
