{"id":6916,"date":"2021-07-30T11:07:17","date_gmt":"2021-07-30T18:07:17","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/commandline\/?p=6916"},"modified":"2021-07-30T11:07:41","modified_gmt":"2021-07-30T18:07:41","slug":"install-wsl-with-a-single-command-now-available-in-windows-10-version-2004-and-higher","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/commandline\/install-wsl-with-a-single-command-now-available-in-windows-10-version-2004-and-higher\/","title":{"rendered":"Install WSL with a single command now available in Windows 10 version 2004 and higher"},"content":{"rendered":"<p>In the latest Windows Insider Preview builds, you can install everything you need to run WSL just by running <code>wsl.exe --install<\/code>. We\u2019re excited to announce that this functionality is now officially backported to Windows 10 version 2004 and higher, which will make installing WSL on those builds much easier!<\/p>\n<h2>Using <code>wsl --install<\/code><\/h2>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2021\/07\/wslupdate.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2021\/07\/wslupdate.png\" alt=\"Image wslupdate\" width=\"1198\" height=\"511\" class=\"aligncenter size-full wp-image-6917\" srcset=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2021\/07\/wslupdate.png 1198w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2021\/07\/wslupdate-300x128.png 300w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2021\/07\/wslupdate-1024x437.png 1024w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2021\/07\/wslupdate-768x328.png 768w\" sizes=\"(max-width: 1198px) 100vw, 1198px\" \/><\/a><\/p>\n<p>The process to set up WSL was previously too complicated, involving turning on multiple settings and installing multiple packages. We\u2019ve simplified the process down to just one command, simply open a command prompt window with admin privileges and run <code>wsl.exe --install<\/code>. Once you hit enter, the process will automatically enable the WSL optional features required, install the Ubuntu distribution by default, and install the latest WSL Linux kernel version onto your machine. When it\u2019s completed and you restart your machine, your distribution will start after you boot up again, completing the installation.<\/p>\n<p>Additionally, you can find a list of Linux distributions available to install by entering the command <code>wsl --list --online<\/code> in PowerShell or Windows Command Prompt. To install a distribution other than, or in addition to, the Ubuntu default, use this command: <code>wsl --install -d &lt;DistroName&gt;<\/code><\/p>\n<p>Replace <code>&lt;DistroName&gt;<\/code> with the name of a Linux distribution found in the previous list command. This install command can be used for first time installation or for adding additional distributions after you already have WSL installed with the default Ubuntu distribution.<\/p>\n<h3>Additional commands<\/h3>\n<p>We\u2019ve also included some additional commands to help you manage your WSL instances with this backport.<\/p>\n<p>You can use <code>wsl --update<\/code> to manually update your WSL Linux kernel, and you can use <code>wsl --update rollback<\/code> to rollback to a previous WSL Linux kernel version.<\/p>\n<p>Lastly, you can use <code>wsl --status<\/code> to see general information about your WSL configuration, such as default distro type, default distro, and kernel version.<\/p>\n<h2>Update your Windows 10 version to support these commands<\/h2>\n<p>You can get this backport just by updating Windows like normal. To manually do this open Windows Settings, go to \u2018Updates and Security\u2019 and hit \u2018Check for Updates\u2019.<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2020\/08\/Screenshot-2020-08-20-115048.png\"><img decoding=\"async\" src=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2020\/08\/Screenshot-2020-08-20-115048.png\" alt=\"Windows Settings check for updates\" width=\"856\" height=\"406\" class=\"aligncenter size-full wp-image-6020\" srcset=\"https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2020\/08\/Screenshot-2020-08-20-115048.png 856w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2020\/08\/Screenshot-2020-08-20-115048-300x142.png 300w, https:\/\/devblogs.microsoft.com\/commandline\/wp-content\/uploads\/sites\/33\/2020\/08\/Screenshot-2020-08-20-115048-768x364.png 768w\" sizes=\"(max-width: 856px) 100vw, 856px\" \/><\/a><\/p>\n<p>This update is part of <a href=\"https:\/\/support.microsoft.com\/en-us\/topic\/july-29-2021-kb5004296-os-builds-19041-1151-19042-1151-and-19043-1151-preview-6aba536a-6ed2-41cb-bc3d-3980e8693cc4\">KB5004296 and you can find full instructions on how to ensure you have it installed and its changes here<\/a>. At the time of writing, when you click \u201cCheck for Updates\u201d you might see an available optional update, ensure that it has the same number as KB5004296, install it, and you\u2019ll get access to <code>wsl --update<\/code>.<\/p>\n<h2>Where to give us your feedback<\/h2>\n<p>As always, you can follow up with <a href=\"https:\/\/twitter.com\/i\/lists\/1131397802204864512\/members\">WSL team members<\/a>, or <a href=\"https:\/\/twitter.com\/craigaloewen\">with me on Twitter<\/a>. If you\u2019re experiencing technical issues please file them on the <a href=\"https:\/\/github.com\/microsoft\/wsl\">Microsoft\/WSL Github repo<\/a>. Learn more about WSL, including how to set up common development tools like Git, VS Code, Docker containers, databases, GPU acceleration for machine learning, and more, by visiting the <a href=\"https:\/\/docs.microsoft.com\/windows\/wsl\">WSL documentation<\/a>. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the latest Windows Insider Preview builds, you can install everything you need to run WSL just by running wsl.exe &#8211;install. We\u2019re excited to announce that this functionality is now officially backported to Windows 10 version 2004 and higher, which will make installing WSL on those builds much easier! Using wsl &#8211;install The process to [&hellip;]<\/p>\n","protected":false},"author":2191,"featured_media":6917,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,9],"tags":[],"class_list":["post-6916","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-commandline","category-bash-on-ubuntu-on-windows"],"acf":[],"blog_post_summary":"<p>In the latest Windows Insider Preview builds, you can install everything you need to run WSL just by running wsl.exe &#8211;install. We\u2019re excited to announce that this functionality is now officially backported to Windows 10 version 2004 and higher, which will make installing WSL on those builds much easier! Using wsl &#8211;install The process to [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts\/6916","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=6916"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/posts\/6916\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/media\/6917"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/media?parent=6916"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/categories?post=6916"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/commandline\/wp-json\/wp\/v2\/tags?post=6916"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}