|
1 | 1 | --- |
2 | | -title: Install the Linux Subsystem on Windows 10 |
3 | | -description: Installation instructions for the Linux Subsystem on Windows 10. |
4 | | -keywords: BashOnWindows, bash, wsl, windows, windows subsystem for linux, windowssubsystem, ubuntu, windows 10 |
5 | | -author: scooley |
6 | | -ms.date: 7/11/2017 |
7 | | -ms.topic: article |
8 | | -ms.prod: windows-subsystem-for-linux |
9 | | -ms.service: windows-subsystem-for-linux |
10 | | -ms.assetid: 7afaeacf-435a-4e58-bff0-a9f0d75b8a51 |
| 2 | +redirect_url: install-win10 |
11 | 3 | --- |
12 | | - |
13 | | -# Windows 10 Installation Guide |
14 | | - |
15 | | -## Prerequisites |
16 | | -Your PC must be running a 64-bit version of Windows 10 Anniversary Update or later (build 1607+). |
17 | | - |
18 | | -To find your PC's architecture and Windows build number, open |
19 | | -**Settings** > **System** > **About** |
20 | | - |
21 | | -Look for the **OS Build** and **System Type** fields. |
22 | | -  |
23 | | - |
24 | | -## Install the Windows Subsystem for Linux |
25 | | -Enable the "Windows Subsystem for Linux" optional feature and reboot. |
26 | | - |
27 | | -1. Open PowerShell as Administrator and run: |
28 | | - ``` PowerShell |
29 | | - Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux |
30 | | - ``` |
31 | | -
|
32 | | -2. Restart your computer when prompted. |
33 | | -
|
34 | | -## Fall Creators Update and later: Install from the Windows Store |
35 | | -
|
36 | | -> This section is for Windows Insiders (build 16215 or later). Follow these steps to [Check your build](install_guide.md#prerequisites). For earlier versions of Windows 10, follow [these instructions using lxrun](install_guide.md#for-anniversary-update-and-creators-update-install-using-lxrun). |
37 | | -
|
38 | | -1. Open the Windows Store and choose your favorite Linux distribution. |
39 | | - Here are links directly to the store installers: |
40 | | - * [Ubuntu](https://www.microsoft.com/store/p/ubuntu/9nblggh4msv6) |
41 | | - * [OpenSUSE](https://www.microsoft.com/store/apps/9njvjts82tjx) |
42 | | - * [SLES](https://www.microsoft.com/store/apps/9p32mwbh6cns) |
43 | | -
|
44 | | -  |
45 | | -
|
46 | | -2. Select "Get" |
47 | | -
|
48 | | - > **Troubleshooting: Installation failed with error 0x80070003** |
49 | | - > The Windows Subsystem for Linux only runs on your system drive (usually this is your C: drive). Make sure that new apps are stored on your system drive. |
50 | | - > Open **Settings** -> **Storage** -> **More Storage Settings: Change where new content is saved** |
51 | | - >  |
52 | | - |
53 | | -3. Once the download has completed, select "Launch". |
54 | | - This will open a console window. Wait for installation to complete then you will be prompted to create your UNIX user account. |
55 | | -  |
56 | | - |
57 | | - > **Troubleshooting: Installation failed with error 0x8007007e** |
58 | | - > This error occurs when your system doesn't support Linux from the store. Make sure that: |
59 | | - > * You're running Windows build 16215 or later. [Check your build](install_guide.md#prerequisites). |
60 | | - > * The Windows Subsystem for Linux optional component is enabled. [Instructions here](install_guide.md#Install-the-Windows-Subsystem-for-Linux). |
61 | | -
|
62 | | - |
63 | | -5. Create your UNIX username and password. This user account can be different from, and has no relationship to, your Windows username and password. [Read more](https://msdn.microsoft.com/en-us/commandline/wsl/user_support). |
64 | | -
|
65 | | -You're done! Now you can use your Linux environment. |
66 | | -
|
67 | | -## For Anniversary Update and Creators Update: Install using lxrun |
68 | | -lxrun installs Ubuntu user-mode by default on top of the Windows subsystem for Linux. |
69 | | -
|
70 | | -> Since moving to the store, we have stopped keeping this user-mode image up to date. When you're done, run apt-get update. |
71 | | -
|
72 | | -1. Turn on Developer Mode |
73 | | -
|
74 | | - Open **Settings** -> **Update and Security** -> **For developers** |
75 | | -
|
76 | | - Select the Developer Mode radio button |
77 | | -  |
78 | | -
|
79 | | -2. Open a command prompt. Run `bash` |
80 | | -  |
81 | | -
|
82 | | - After you have accepted the License, the Ubuntu user-mode image will be downloaded and extracted. A "Bash on Ubuntu on Windows" shortcut will be added to your start menu. |
83 | | -
|
84 | | -3. Launch a new Ubuntu shell by either: |
85 | | - * Running `bash` from a command-prompt |
86 | | - * Clicking the start menu shortcut |
87 | | -
|
88 | | -4. Create a UNIX user |
89 | | - |
90 | | - The first time you install the Windows subsystem for Linux, you will be prompted to create a UNIX username and password. |
91 | | -  |
92 | | - |
93 | | - This UNIX username and password can be different from, and has no relationship to, your Windows username and password. [Learn more about your UNIX account.](https://msdn.microsoft.com/en-us/commandline/wsl/user_support). |
94 | | -
|
95 | | -After installation your Linux distribution will be located at: `%localappdata%\lxss\`. |
96 | | -
|
97 | | -**Avoid creating and/or modifying files in %localappdata%\lxss\ using Windows tools and apps!** If you do, it is likely that your Linux files will be corrupted and data loss may occur. Avoid this issue by using a directory located under /mnt/. |
98 | | -Read this [blog post](https://blogs.msdn.microsoft.com/commandline/2016/11/17/do-not-change-linux-files-using-windows-apps-and-tools/) for more information. |
99 | | -
|
100 | | -You're done! Go use your new Linux environment! |
0 commit comments