{"id":7243,"date":"2021-03-31T22:26:00","date_gmt":"2021-03-31T20:26:00","guid":{"rendered":"https:\/\/michlstechblog.info\/blog\/?p=7243"},"modified":"2021-11-29T11:33:03","modified_gmt":"2021-11-29T10:33:03","slug":"windows-enable-windows-subsystem-for-linux","status":"publish","type":"post","link":"https:\/\/michlstechblog.info\/blog\/windows-enable-windows-subsystem-for-linux\/","title":{"rendered":"Windows: Enable (WSL) Windows Subsystem for Linux"},"content":{"rendered":"<div class=\"twoclick_social_bookmarks_post_7243 social_share_privacy clearfix 1.6.4 locale-en_US sprite-en_US\"><\/div><div class=\"twoclick-js\"><script type=\"text\/javascript\">\/* <![CDATA[ *\/\njQuery(document).ready(function($){if($('.twoclick_social_bookmarks_post_7243')){$('.twoclick_social_bookmarks_post_7243').socialSharePrivacy({\"services\":{\"flattr\":{\"uid\":\"Michl\",\"status\":\"on\",\"the_title\":\"Windows%3A%20Enable%20%28WSL%29%20Windows%20Subsystem%20for%20Linux\",\"the_excerpt\":\"Hi%2C%0D%0A%0D%0Athese%20are%20the%20steps%20to%20enable%20WSL%20%282%29%20on%20Windows%2010%20%26gt%3B%3D%202004.%0D%0A%0D%0AOpen%20Powershell%20with%20administrator%20permissions%20%28right%20click%29%20and%20install%20the%20features%20VirtualMachinePlatform%20and%20Microsoft-Windows-Subsystem-Linux.%0D%0A%20%28more%26hellip%3B%29\",\"txt_info\":\"2 clicks for more data protection:\\r\\n\\r\\nOnly when you click here, the button will be come active and you can send your recommendation to Flattr. When activating, data are transmitted to third parties. \",\"perma_option\":\"off\"}},\"txt_help\":\"When you activate these fields by clicking, information to Flattr may be transferred abroad, and probably may also stored there.\",\"settings_perma\":\"Enable permanently and accept data transmission. \",\"info_link\":\"http:\\\/\\\/www.heise.de\\\/ct\\\/artikel\\\/2-Klicks-fuer-mehr-Datenschutz-1333879.html\",\"uri\":\"https:\\\/\\\/michlstechblog.info\\\/blog\\\/windows-enable-windows-subsystem-for-linux\\\/\",\"post_id\":7243,\"post_title_referrer_track\":\"Windows%3A+Enable+%28WSL%29+Windows+Subsystem+for+Linux\",\"display_infobox\":\"on\"});}});\n\/* ]]> *\/<\/script><\/div><p>Hi,<\/p>\n<p>these are the steps to enable WSL (2) on Windows 10 &gt;= 2004.<br \/>\n<!-- https:\/\/itrig.de\/index.php?\/archives\/2394-WSL2-Windows-Subsystem-for-Linux-Installation-unter-Windows-und-praktische-Konsolenbefehle.html https:\/\/www.windowscentral.com\/install-windows-subsystem-linux-windows-10 --><br \/>\nOpen Powershell with administrator permissions (right click) and install the features <strong>VirtualMachinePlatform <\/strong>and <strong>Microsoft-Windows-Subsystem-Linux<\/strong>.<br \/>\n<!--more--><\/p>\n<pre class=\"brush: powershell; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform,Microsoft-Windows-Subsystem-Linux,Microsoft-Hyper-V-All\r\n<\/pre>\n<p><a href=\"https:\/\/wslstorestorage.blob.core.windows.net\/wslblob\/wsl_update_x64.msi\" target=\"_blank\" rel=\"noopener\">Download and Install<\/a> the <a href=\"https:\/\/docs.microsoft.com\/de-de\/windows\/wsl\/install-win10#step-4---download-the-linux-kernel-update-package\" target=\"_blank\" rel=\"noopener\">kernel update<\/a><\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwsl.exe --set-default-version 2\r\n<\/pre>\n<p>List all distribution which can be installed<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nwsl -l -o\r\n<\/pre>\n<p>Install a <a href=\"https:\/\/docs.microsoft.com\/de-de\/windows\/wsl\/install-manual\" target=\"_blank\" rel=\"noopener\">distributon<\/a><br \/>\nThe following distributions are currently available:<\/p>\n<p><a href=\"https:\/\/aka.ms\/wslubuntu2004\" target=\"_blank\" rel=\"noopener\">Ubuntu 20.04<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wslubuntu2004arm\" target=\"_blank\" rel=\"noopener\">Ubuntu 20.04 ARM<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-ubuntu-1804\" target=\"_blank\" rel=\"noopener\">Ubuntu 18.04<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-ubuntu-1804-arm\" target=\"_blank\" rel=\"noopener\">Ubuntu 18.04 ARM<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-ubuntu-1604\" target=\"_blank\" rel=\"noopener\">Ubuntu 16.04<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-debian-gnulinux\" target=\"_blank\" rel=\"noopener\">Debian GNU\/Linux<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-kali-linux-new\" target=\"_blank\" rel=\"noopener\">Kali Linux<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-opensuse-42\" target=\"_blank\" rel=\"noopener\">OpenSUSE Leap 42<\/a><br \/>\n<a href=\"https:\/\/aka.ms\/wsl-sles-12\" target=\"_blank\" rel=\"noopener\">SUSE Linux Enterprise Server 12<\/a><br \/>\n<a href=\"https:\/\/github.com\/WhitewaterFoundry\/WSLFedoraRemix\/releases\/\" target=\"_blank\" rel=\"noopener\">Fedora Remix for WSL<\/a><\/p>\n<p>Install it via the Microsoft store or, if you want it install offline, download the appx package over the link(s) an use Add-AppxPackage.<\/p>\n<p>For example debian<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nPS D:\\&gt; Invoke-WebRequest -Uri https:\/\/aka.ms\/wsl-debian-gnulinux -OutFile D:\\temp\\debian.appx -UseBasicParsing\r\nPS D:\\&gt; Add-AppxPackage D:\\temp\\debian.appx\r\n<\/pre>\n<p>Start debian via the startmenu or from command line<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n$oPackage=Get-AppxPackage TheDebianProject.DebianGNULinux\r\n&#x5B;&#x5B;xml]]$AppManifest=Get-Content (&#x5B;System.IO.Path]::Combine($oPackage.InstallLocation,&quot;AppxManifest.xml&quot;))\r\n$PackageFamilyName=$oPackage.PackageFamilyName\r\n$AppId=$AppManifest.Package.Applications.Application.GetAttribute(&quot;Id&quot;)\r\nStart-Process -FilePath &quot;explorer.exe&quot; (&#x5B;String]::Format(&quot;shell:appsFolder\\{0}!{1}&quot;,$PackageFamilyName,$AppId))\r\n<\/pre>\n<figure id=\"attachment_7562\" aria-describedby=\"caption-attachment-7562\" style=\"width: 833px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2021\/03\/WSL-Newuser.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-7562\" src=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2021\/03\/WSL-Newuser.png\" alt=\"New user\" width=\"833\" height=\"153\" srcset=\"https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2021\/03\/WSL-Newuser.png 833w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2021\/03\/WSL-Newuser-300x55.png 300w, https:\/\/michlstechblog.info\/blog\/wp-content\/uploads\/2021\/03\/WSL-Newuser-768x141.png 768w\" sizes=\"auto, (max-width: 833px) 100vw, 833px\" \/><\/a><figcaption id=\"caption-attachment-7562\" class=\"wp-caption-text\">New user<\/figcaption><\/figure>\n<p>Your local Windows disk are mount under <strong>\/mnt<\/strong>. C: for example unter <strong>\/mnt\/c<\/strong><\/p>\n<p>You can also call every windows command line tool within the wsl container.<\/p>\n<p>Michael<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, these are the steps to enable WSL (2) on Windows 10 &gt;= 2004. Open Powershell with administrator permissions (right click) and install the features VirtualMachinePlatform and Microsoft-Windows-Subsystem-Linux.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1563],"tags":[1566,1567,1564,1569,57,787,1565,1570,20,1568],"class_list":["post-7243","post","type-post","status-publish","format-standard","hentry","category-windows-subsystem-for-linux","tag-for-linux","tag-install-distribution","tag-installtion","tag-linux-command-line","tag-offline","tag-start","tag-subsystem","tag-tutorial","tag-windows-2","tag-wsl2"],"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/comments?post=7243"}],"version-history":[{"count":18,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7243\/revisions"}],"predecessor-version":[{"id":8181,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/posts\/7243\/revisions\/8181"}],"wp:attachment":[{"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/media?parent=7243"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/categories?post=7243"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/michlstechblog.info\/blog\/wp-json\/wp\/v2\/tags?post=7243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}