初始化新安装的分发版Initializing a newly installed distro

下载并安装分发版后,需要对新的分发版完成初始化:Once your distro has been downloaded and installed, you'll need to complete initialization of the new distro:

启动分发版Launch a distro

若要完成新安装的分发版的初始化,请启动新实例。To complete the initialization of your newly installed distro, launch a new instance. 为此,可以单击 Microsoft Store 应用中的“启动”按钮,或者从“开始”菜单启动分发版:You can do this by clicking the "launch" button in the Microsoft Store app, or launching the distro from the Start menu:

提示:可将最常用的分发版固定到“开始”菜单和/或任务栏!Tip: You might want to pin your most frequently used distros to your Start menu, and/or to your taskbar!

从“开始”菜单启动分发版

在 Windows Server 上,可以从分发版的安装文件夹启动分发版的启动程序可执行文件 <distro>.exeOn Windows Server, you can launch your distro's launcher executable <distro>.exe from the distro installation folder.

首次运行新安装的分发版时,会打开一个控制台窗口,其中指出需要等待一两分钟时间来完成安装。The first time a newly installed distro runs, a Console window will open, and you'll be asked to wait for a minute or two for the installation to complete.

在这最后一个安装阶段,分发版的文件将会解压缩,并存储在电脑上供你使用。During this final stage of installation, the distro's files are de-compressed and stored on your PC, ready for use. 这可能需要一分钟或更长时间,具体取决于电脑存储设备的性能。This may take around a minute or more depending on the performance of your PC's storage devices. 仅当分发版是干净安装的版本时,才需要执行此初始安装阶段 - 将来在不到一秒内即可启动分发版。This initial installation phase is only required when a distro is clean-installed - all future launches should take less than a second.

设置新的 Linux 用户帐户Setting up a new Linux user account

安装完成后,系统会提示创建新的用户帐户(及其密码)。Once installation is complete, you will be prompted to create a new user account (and its password).

Windows 控制台中的 Ubuntu 解包

此用户帐户用于启动分发版时默认登录的非管理员用户。This user account is for the normal non-admin user that you'll be logged-in as by default when launching a distro.

可根据需要选择任何用户名和密码 - 它们与 Windows 用户名无关。You can choose any username and password you wish - they have no bearing on your Windows username.

打开新的分发版实例时,系统不会提示你输入密码,但如果使用 sudo 提升了进程的权限,则需要输入密码,因此请确保选择一个容易记住的密码!When you open a new distro instance, you won't be prompted for your password, but if you elevate a process using sudo, you will need to enter your password, so make sure you choose a password you can easily remember! 有关详细信息,请参阅用户支持页。See the User Support page for more info.

更新和升级分发版的包Update & upgrade your distro's packages

大多数分发版随附了一个空的/精简的包目录。Most distros ship with an empty/minimal package catalog. 我们强烈建议定期更新包目录,并使用分发版的首选包管理器升级已安装的包。We strongly recommend regularly updating your package catalog, and upgrading your installed packages using your distro's preferred package manager. 在 Debian/Ubuntu 上使用 apt:On Debian/Ubuntu, you use apt:

sudo apt update && sudo apt upgrade

Windows 不会自动更新或升级 Linux 分发版:Linux 用户往往倾向于自行控制此任务。Windows does not automatically update or upgrade your Linux distro(s): This is a task that the Linux users prefer to control themselves.

大功告成!You're done! 现在,可以在 WSL 上享用新的 Linux 分发版!Enjoy using your new Linux distro on WSL! 若要详细了解 WSL,请查看其他 WSL 文档WSL 学习资源页To learn more about WSL, review the other WSL docs, or the WSL learning resources page.

在 WSL 上享用 Linux

疑难解答Troubleshooting

下面是相关的错误和建议的修复措施。Below are related errors and suggested fixes. 有关其他常见错误及其解决方法,请参阅 WSL 故障排除页Refer to the WSL troubleshooting page for other common errors and their solutions.

安装失败并出现错误 0x8007007e 如果系统不支持从 Store 安装的 Linux,则会出现此错误。Installation failed with error 0x8007007e This error occurs when your system doesn't support Linux from the store. 请确保:Make sure that: