{"id":4876,"date":"2019-07-26T10:10:44","date_gmt":"2019-07-26T17:10:44","guid":{"rendered":"http:\/\/devblogs.microsoft.com\/commandline\/?p=4876"},"modified":"2019-10-30T12:54:23","modified_gmt":"2019-10-30T19:54:23","slug":"whats-new-for-wsl-in-insiders-preview-build-18945","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/commandline\/whats-new-for-wsl-in-insiders-preview-build-18945\/","title":{"rendered":"What\u2019s new for WSL in Insiders Preview Build 18945"},"content":{"rendered":"<p>A new Windows insiders build has just released, and it contains some hot off the press features for the Windows Subsystem for Linux (WSL)! We\u2019ve added the ability to access Linux networking applications in a WSL 2 distro from Windows with <code>localhost<\/code>, as well as global configuration options that will give you greater control over your Linux distros, such as specifying a custom kernel for the WSL 2 Virtual Machine (VM). You can find the full release notes for the WSL updates in this build <a href=\"https:\/\/github.com\/MicrosoftDocs\/WSL\/releases\/tag\/18945\">here<\/a> and you can view all of the updates in this build <a href=\"https:\/\/blogs.windows.com\/windowsexperience\/2019\/07\/26\/announcing-windows-10-insider-preview-build-18945\/\">here<\/a>.<\/p>\n<h2>Use <code>localhost<\/code> to connect to your Linux applications from Windows<\/h2>\n<p>In the first released build with WSL 2, you needed to access your networking applications via remote IP addresses. We stated that this was high on our priority list to fix, and so we are happy to say that we\u2019ve started this process already by giving you the ability to access your Linux networking apps from Windows with <code>localhost<\/code>.<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2019\/07\/WSL2Localhost2.png\" alt=\"Connecting to a nodeJS site using localhost in WSL 2\" width=\"1649\" height=\"550\" class=\"aligncenter size-full wp-image-4914\" srcset=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2019\/07\/WSL2Localhost2.png 1649w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2019\/07\/WSL2Localhost2-300x100.png 300w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2019\/07\/WSL2Localhost2-768x256.png 768w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2019\/07\/WSL2Localhost2-1024x342.png 1024w\" sizes=\"(max-width: 1649px) 100vw, 1649px\" \/><\/p>\n<p>In the future we want to make sure that you can access your Windows networking applications from Linux using <code>localhost<\/code> as well. We\u2019ve prioritized Linux apps from Windows as that\u2019s the most common networking use case, such as a web developer accessing their website in a browser. Stay tuned for more improvements in this area!<\/p>\n<h2>WSL global configuration<a name=\"wslconfig\"><\/a><\/h2>\n<p>Since Insider Build 17093 you have been able to <a href=\"https:\/\/devblogs.microsoft.com\/commandline\/automatically-configuring-wsl\/\">configure your WSL distros using <code>wsl.conf<\/code><\/a>. These options are great to configure individual distros, such as enabling or disabling automounting Windows drives, changing mount locations, disabling interop, etc. However, there are some possible options that need to be applied to all distributions. This has become especially important recently due to WSL 2. All WSL 2 distros are run on the same virtual machine (VM), and therefore any configuration options to this VM will be applied globally to all WSL 2 distros. In this new update we\u2019ve added the ability to start using global config options for WSL. These options are targeted towards power users who want to further customize their WSL experience.<\/p>\n<p>To get started, create a new file called <code>.wslconfig<\/code> in your Users folder ( <code>C:\\Users\\&lt;yourUsername&gt;\\<\/code> where <code>&lt;yourUsername&gt;<\/code> is your Windows login name). The <code>.wslconfig<\/code> file is modelled after an <a href=\"https:\/\/en.wikipedia.org\/wiki\/INI_file\">INI file<\/a>, just like .gitconfig.<\/p>\n<p>We\u2019ve added some initial configuration options, and you can find the full list of what was added in this build <a href=\"https:\/\/github.com\/MicrosoftDocs\/WSL\/releases\/tag\/18945\">here<\/a>. The most exciting one is specifying a custom kernel!<\/p>\n<h3>Using a custom kernel in WSL 2<\/h3>\n<p>We <a href=\"https:\/\/devblogs.microsoft.com\/commandline\/shipping-a-linux-kernel-with-windows\/\">provide a Linux kernel with WSL 2, and it\u2019s shipped within Windows<\/a>. However, there may be a case where you want a specific kernel powering your WSL 2 distros, such as using a certain kernel module, etc. You can now use the <code>kernel<\/code> option in the <code>.wslconfig<\/code> file to specify a path to a kernel on your machine, and that kernel will be loaded into the WSL 2 VM when it\u2019s started. If no option is specified, you\u2019ll go back to using the Linux kernel provided with Windows as part of WSL 2.<\/p>\n<h2>Tell us what you think!<\/h2>\n<p>If you run into any technical issues using this build please file an issue on our <a href=\"https:\/\/github.com\/microsoft\/wsl\/\">Github repo: Microsoft\/WSL<\/a>. Additionally, if you have any WSL related questions or want to stay up to date with WSL news you can find a list of WSL team members that are active on Twitter <a href=\"https:\/\/twitter.com\/craigaloewen\/lists\/wsl-team-members\/members\">here<\/a>.<\/p>\n<p>We\u2019ll be looking forwards to delivering more updates in the future.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A new Windows insiders build has just released, and it contains some hot off the press features for the Windows Subsystem for Linux (WSL)! We\u2019ve added the ability to access Linux networking applications in a WSL 2 distro from Windows with localhost, as well as global configuration options that will give you greater control over [&hellip;]<\/p>\n","protected":false},"author":2191,"featured_media":4914,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[2,9],"tags":[],"class_list":["post-4876","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-command-line","category-bash-on-ubuntu-on-windows"],"acf":[],"blog_post_summary":"<p>A new Windows insiders build has just released, and it contains some hot off the press features for the Windows Subsystem for Linux (WSL)! We\u2019ve added the ability to access Linux networking applications in a WSL 2 distro from Windows with localhost, as well as global configuration options that will give you greater control over [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts\/4876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/users\/2191"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/comments?post=4876"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts\/4876\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/media\/4914"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/media?parent=4876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/categories?post=4876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/tags?post=4876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}