{"id":3810,"date":"2023-11-22T12:25:48","date_gmt":"2023-11-22T04:25:48","guid":{"rendered":"https:\/\/www.servergigabit.com\/guide\/?post_type=kb&#038;p=3810"},"modified":"2026-03-16T11:04:49","modified_gmt":"2026-03-16T03:04:49","slug":"installing-wsl-windows-10-guide","status":"publish","type":"kb","link":"https:\/\/www.servergigabit.com\/guide\/kb\/installing-wsl-windows-10-guide","title":{"rendered":"Installing WSL 2: Easy Way to Run Linux on Windows 10"},"content":{"rendered":"<div class=\"markdown markdown-main-panel\" dir=\"ltr\">\n<p data-sourcepos=\"7:1-7:274\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone wp-image-3811\" src=\"https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-300x169.jpeg\" alt=\"Installing WSL \" width=\"685\" height=\"386\" srcset=\"https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-300x169.jpeg 300w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-1024x576.jpeg 1024w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-768x432.jpeg 768w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-1536x864.jpeg 1536w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-2048x1152.jpeg 2048w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-370x208.jpeg 370w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-1230x692.jpeg 1230w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-800x450.jpeg 800w, https:\/\/www.servergigabit.com\/guide\/wp-content\/uploads\/2023\/11\/z-390x219.jpeg 390w\" sizes=\"(max-width: 685px) 100vw, 685px\" \/><\/p>\n<p data-sourcepos=\"7:1-7:274\">Installing WSL allows you to run a Linux environment directly on your Windows machine without the need for virtual machines. This guide will walk you through the process of installing and enabling WSL on your local machine and installing Ubuntu 22.04 LTS.<\/p>\n<h2 data-sourcepos=\"9:1-9:17\"><strong>Prerequisites<\/strong><\/h2>\n<p data-sourcepos=\"11:1-11:72\">Before proceeding, ensure that your PC meets the following requirements:<\/p>\n<ul data-sourcepos=\"13:1-15:0\">\n<li data-sourcepos=\"13:1-13:36\">Windows 10 Version 1903 (or later)<\/li>\n<li data-sourcepos=\"14:1-15:0\">Build 18362 (or later)<\/li>\n<\/ul>\n<h2 data-sourcepos=\"16:1-16:16\"><strong>Enabling WSL<\/strong><\/h2>\n<p>Open the Start menu and search for &#8220;PowerShell&#8221;.<\/p>\n<p>Right-click on Windows PowerShell and select &#8220;Run as administrator&#8221;.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-1.png\" alt=\"Run PowerShell as Administrator\" \/><\/p>\n<p>Execute <span class=\"citation-0\">the following command to enable WSL:<\/span><\/p>\n<div class=\"code-block ng-star-inserted\">\n<pre><code class=\"code-container no-decoration-radius\" role=\"text\"><span class=\"citation-0 citation-end-0\">dism.exe \/online \/enable-feature \/featurename:Microsoft-Windows-Subsystem-Linux \/all \/norestart<\/span>\r\n<\/code><\/pre>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image.png\" alt=\"Enable WSL\" \/><\/p>\n<p>Execute the following command to enable the &#8220;Windows Virtual Machine Platform&#8221;:<\/p>\n<div class=\"code-block ng-star-inserted\">\n<pre><code class=\"code-container no-decoration-radius\" role=\"text\">dism.exe \/online \/enable-feature \/featurename:VirtualMachinePlatform \/all \/norestart\r\n<\/code><\/pre>\n<\/div>\n<p><img decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-4.png\" alt=\"Enabling WSL 2\" \/><\/p>\n<p>Restart your PC for the changes to take effect.<\/p>\n<h2 data-sourcepos=\"34:1-34:46\"><strong>Installing the Linux Kernel Update Package<\/strong><\/h2>\n<p data-sourcepos=\"36:4-36:69\">Download the Linux kernel update package from Microsoft&#8217;s website.<\/p>\n<p data-sourcepos=\"38:4-38:95\">Execute the downloaded file to start the installation and follow the on-screen instructions.<\/p>\n<p data-sourcepos=\"38:4-38:95\"><img decoding=\"async\" class=\"\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-3.png\" alt=\"Download the Linux Kernel\" width=\"655\" height=\"512\" \/><\/p>\n<h2 data-sourcepos=\"40:1-40:28\"><strong>Setting WSL 2 as Default<\/strong><\/h2>\n<p>Open PowerShell as administrator.<\/p>\n<p>Execute the following command to set WSL 2 as the default version:<\/p>\n<div class=\"code-block ng-star-inserted\">\n<pre><code class=\"code-container no-decoration-radius\" role=\"text\">wsl --set-default-version 2\r\n<\/code><\/pre>\n<\/div>\n<h2 data-sourcepos=\"49:1-49:35\"><strong>Installing a Linux Distribution<\/strong><\/h2>\n<p>Choose the Linux distribution you want to install from the following list:<\/p>\n<div class=\"horizontal-scroll-wrapper\">\n<div class=\"table-block-component\">\n<div class=\"table-block\">\n<div class=\"table-content\">\n<table data-sourcepos=\"53:1-80:31\">\n<tbody>\n<tr data-sourcepos=\"53:1-53:73\">\n<th data-sourcepos=\"53:1-53:20\">Linux Distribution<\/th>\n<th data-sourcepos=\"53:22-53:48\">Installation via MS Store<\/th>\n<th data-sourcepos=\"53:50-53:71\">Installation via CLI<\/th>\n<\/tr>\n<tr data-sourcepos=\"55:1-55:27\">\n<td data-sourcepos=\"55:1-55:14\">Ubuntu 16.04<\/td>\n<td data-sourcepos=\"55:16-55:19\">No<\/td>\n<td data-sourcepos=\"55:21-55:25\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"56:1-56:27\">\n<td data-sourcepos=\"56:1-56:14\">Ubuntu 18.04<\/td>\n<td data-sourcepos=\"56:16-56:19\">No<\/td>\n<td data-sourcepos=\"56:21-56:25\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"57:1-57:31\">\n<td data-sourcepos=\"57:1-57:18\">Ubuntu 18.04 ARM<\/td>\n<td data-sourcepos=\"57:20-57:23\">No<\/td>\n<td data-sourcepos=\"57:25-57:29\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"58:1-58:31\">\n<td data-sourcepos=\"58:1-58:18\">Ubuntu 18.04 LTS<\/td>\n<td data-sourcepos=\"58:20-58:24\">Yes<\/td>\n<td data-sourcepos=\"58:26-58:29\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"59:1-59:27\">\n<td data-sourcepos=\"59:1-59:14\">Ubuntu 20.04<\/td>\n<td data-sourcepos=\"59:16-59:19\">No<\/td>\n<td data-sourcepos=\"59:21-59:25\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"60:1-60:31\">\n<td data-sourcepos=\"60:1-60:18\">Ubuntu 20.04 ARM<\/td>\n<td data-sourcepos=\"60:20-60:23\">No<\/td>\n<td data-sourcepos=\"60:25-60:29\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"61:1-61:31\">\n<td data-sourcepos=\"61:1-61:18\">Ubuntu 20.04 LTS<\/td>\n<td data-sourcepos=\"61:20-61:24\">Yes<\/td>\n<td data-sourcepos=\"61:26-61:29\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"62:1-62:32\">\n<td data-sourcepos=\"62:1-62:18\">Ubuntu 22.04 LTS<\/td>\n<td data-sourcepos=\"62:20-62:24\">Yes<\/td>\n<td data-sourcepos=\"62:26-62:30\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"63:1-63:32\">\n<td data-sourcepos=\"63:1-63:18\">Debian GNU\/Linux<\/td>\n<td data-sourcepos=\"63:20-63:24\">Yes<\/td>\n<td data-sourcepos=\"63:26-63:30\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"64:1-64:33\">\n<td data-sourcepos=\"64:1-64:20\">OpenSUSE Leap 15.1<\/td>\n<td data-sourcepos=\"64:22-64:26\">Yes<\/td>\n<td data-sourcepos=\"64:28-64:31\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"65:1-65:33\">\n<td data-sourcepos=\"65:1-65:20\">OpenSUSE Leap 15.2<\/td>\n<td data-sourcepos=\"65:22-65:25\">No<\/td>\n<td data-sourcepos=\"65:27-65:31\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"66:1-66:33\">\n<td data-sourcepos=\"66:1-66:20\">OpenSUSE Leap 15.3<\/td>\n<td data-sourcepos=\"66:22-66:25\">No<\/td>\n<td data-sourcepos=\"66:27-66:31\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"67:1-67:34\">\n<td data-sourcepos=\"67:1-67:21\">OpenSUSE Tumbleweed<\/td>\n<td data-sourcepos=\"67:23-67:26\">No<\/td>\n<td data-sourcepos=\"67:28-67:32\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"68:1-68:46\">\n<td data-sourcepos=\"68:1-68:33\">SUSE Linux Enterprise Server 12<\/td>\n<td data-sourcepos=\"68:35-68:38\">No<\/td>\n<td data-sourcepos=\"68:40-68:44\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"69:1-69:50\">\n<td data-sourcepos=\"69:1-69:37\">SUSE Linux Enterprise Server 12 SP5<\/td>\n<td data-sourcepos=\"69:39-69:43\">Yes<\/td>\n<td data-sourcepos=\"69:45-69:48\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"70:1-70:50\">\n<td data-sourcepos=\"70:1-70:37\">SUSE Linux Enterprise Server 15 SP1<\/td>\n<td data-sourcepos=\"70:39-70:43\">Yes<\/td>\n<td data-sourcepos=\"70:45-70:48\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"71:1-71:50\">\n<td data-sourcepos=\"71:1-71:37\">SUSE Linux Enterprise Server 15 SP2<\/td>\n<td data-sourcepos=\"71:39-71:42\">No<\/td>\n<td data-sourcepos=\"71:44-71:48\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"72:1-72:50\">\n<td data-sourcepos=\"72:1-72:37\">SUSE Linux Enterprise Server 15 SP3<\/td>\n<td data-sourcepos=\"72:39-72:42\">No<\/td>\n<td data-sourcepos=\"72:44-72:48\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"73:1-73:26\">\n<td data-sourcepos=\"73:1-73:12\">Kali Linux<\/td>\n<td data-sourcepos=\"73:14-73:18\">Yes<\/td>\n<td data-sourcepos=\"73:20-73:24\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"74:1-74:36\">\n<td data-sourcepos=\"74:1-74:22\">Fedora Remix for WSL<\/td>\n<td data-sourcepos=\"74:24-74:28\">Yes<\/td>\n<td data-sourcepos=\"74:30-74:34\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"75:1-75:22\">\n<td data-sourcepos=\"75:1-75:9\">Pengwin<\/td>\n<td data-sourcepos=\"75:11-75:15\">Yes<\/td>\n<td data-sourcepos=\"75:17-75:20\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"76:1-76:33\">\n<td data-sourcepos=\"76:1-76:20\">Pengwin Enterprise<\/td>\n<td data-sourcepos=\"76:22-76:26\">Yes<\/td>\n<td data-sourcepos=\"76:28-76:31\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"77:1-77:25\">\n<td data-sourcepos=\"77:1-77:12\">Alpine WSL<\/td>\n<td data-sourcepos=\"77:14-77:18\">Yes<\/td>\n<td data-sourcepos=\"77:20-77:23\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"78:1-78:32\">\n<td data-sourcepos=\"78:1-78:19\">Raft (Free Trial)<\/td>\n<td data-sourcepos=\"78:21-78:25\">Yes<\/td>\n<td data-sourcepos=\"78:27-78:30\">No<\/td>\n<\/tr>\n<tr data-sourcepos=\"79:1-79:31\">\n<td data-sourcepos=\"79:1-79:18\">Oracle Linux 7.9<\/td>\n<td data-sourcepos=\"79:20-79:23\">No<\/td>\n<td data-sourcepos=\"79:25-79:29\">Yes<\/td>\n<\/tr>\n<tr data-sourcepos=\"80:1-80:31\">\n<td data-sourcepos=\"80:1-80:18\">Oracle Linux 8.5<\/td>\n<td data-sourcepos=\"80:20-80:23\">No<\/td>\n<td data-sourcepos=\"80:25-80:29\">Yes<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h4 data-sourcepos=\"82:4-82:37\"><strong>Installing via Microsoft Store<\/strong><\/h4>\n<p data-sourcepos=\"84:4-84:69\">a. Access the <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install-manual#step-6---install-your-linux-distribution-of-choice\" target=\"_blank\" rel=\"noopener\">Microsoft Store<\/a> for the selected Linux distribution.<\/p>\n<p data-sourcepos=\"86:4-86:61\">b. Click on the &#8220;Get&#8221; button to initiate the installation.<\/p>\n<p data-sourcepos=\"86:4-86:61\"><img decoding=\"async\" class=\"\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-5.png\" alt=\"install ubuntu in ms store\" width=\"656\" height=\"321\" \/><\/p>\n<p data-sourcepos=\"88:4-88:70\">c. Open the newly installed Linux distribution from the Start menu.<\/p>\n<p data-sourcepos=\"88:4-88:70\"><img decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-7.png\" alt=\"create a new ubuntu user\" \/><\/p>\n<p data-sourcepos=\"90:4-90:61\">d. Create a username and password for your Linux instance.<\/p>\n<h4 data-sourcepos=\"92:4-92:50\"><strong>Installing via Command Line Interface (CLI)<\/strong><\/h4>\n<p data-sourcepos=\"94:4-94:39\">a. Open PowerShell as administrator.<\/p>\n<p data-sourcepos=\"96:4-96:98\">b. Obtain the <a href=\"https:\/\/aka.ms\/wsl-debian-gnulinux\" target=\"_blank\" rel=\"noopener\">download<\/a> link for the selected Linux distribution from <a href=\"https:\/\/learn.microsoft.com\/en-us\/windows\/wsl\/install-manual#downloading-distributions\" target=\"_blank\" rel=\"noopener\">Microsoft&#8217;s documentation<\/a>.<\/p>\n<p data-sourcepos=\"98:4-98:71\">c. Execute the following command to download the Linux distribution:<\/p>\n<div class=\"code-block ng-star-inserted\">\n<pre><code class=\"code-container no-decoration-radius\" role=\"text\">curl.exe -L -o ubuntu-2004.appx [link_to_your_linux_distro]\r\n<\/code><\/pre>\n<\/div>\n<p data-sourcepos=\"104:4-104:60\">d. Execute the following command to add the Appx-Package:<\/p>\n<div class=\"code-block ng-star-inserted\">\n<pre><code class=\"code-container no-decoration-radius\" role=\"text\">Add-AppxPackage .\\app_name.appx\r\n<\/code><\/pre>\n<\/div>\n<p data-sourcepos=\"110:4-110:66\">e. Double-click the downloaded Appx-Package file to install it.<\/p>\n<p data-sourcepos=\"112:4-112:36\">f. Click on the &#8220;Install&#8221; button.<\/p>\n<p data-sourcepos=\"112:4-112:36\"><img loading=\"lazy\" decoding=\"async\" class=\"\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-6.png\" alt=\"Install debian using cli\" width=\"658\" height=\"418\" \/><\/p>\n<p data-sourcepos=\"114:4-114:52\">g. Launch the newly installed Linux distribution.<\/p>\n<p data-sourcepos=\"114:4-114:52\"><img decoding=\"async\" src=\"https:\/\/contabo.com\/blog\/wp-content\/uploads\/2023\/06\/image-9.png\" alt=\"create a new debian user\" \/><\/p>\n<p data-sourcepos=\"116:4-116:51\">h. Create a username and password for your Linux<\/p>\n<h2 data-sourcepos=\"3:1-3:14\"><strong>Conclusion<\/strong><\/h2>\n<p data-sourcepos=\"5:1-5:96\">By following the steps outlined in this guide, you can effectively install and configure Windows Subsystem for Linux 2 on your Microsoft Windows 10 machine. With WSL, you can seamlessly integrate Linux environments into your Windows workflow, expanding your development and productivity capabilities.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Installing WSL allows you to run a Linux environment directly on your Windows machine without the need for virtual machines. This guide will walk you through the process of installing and enabling WSL on your local machine and installing Ubuntu 22.04 LTS. Prerequisites Before proceeding, ensure that your PC meets the following requirements: Windows 10 Version 1903 (or later) Build&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"kbtopic":[1099],"kbtag":[1160,1158,1161],"class_list":["post-3810","kb","type-kb","status-publish","hentry","kbtopic-tutorials","kbtag-installing-wsl","kbtag-linux","kbtag-wsl"],"_links":{"self":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/3810","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb"}],"about":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/types\/kb"}],"author":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/comments?post=3810"}],"version-history":[{"count":7,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/3810\/revisions"}],"predecessor-version":[{"id":6283,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kb\/3810\/revisions\/6283"}],"wp:attachment":[{"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/media?parent=3810"}],"wp:term":[{"taxonomy":"kbtopic","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtopic?post=3810"},{"taxonomy":"kbtag","embeddable":true,"href":"https:\/\/www.servergigabit.com\/guide\/wp-json\/wp\/v2\/kbtag?post=3810"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}