WSL (Linux subsystem on Windows)
Wsl,windows Subsystem for Linux, that's before bash on [Ubuntu on] Windows (well, Microsoft Renaming Department kpi++), we can run some Linux programs in the WSL environment.
First of all, in fact, Windows 10 in the first anniversary update (1607, build 14393) when it joined the WSL, but until just updated the Fall Creators update (1709, build 16299), WSL officially off beta, gradually stabilized, So I chose to write this article again this time. The following are based on the Fall creator update (1709, build 16299.19).
Next, we formally introduce and install WSL.
windows Subsystem for Linux (" WSL ") is one for Windows Compatibility layer on 10 that natively runs the Linux binary executable (elf format). It was developed by Microsoft in collaboration with Canonical, which aims to enable pure ubuntu 14.04 "trusty Tahr" images to be downloaded and reconciled to the user's local computer, and the tools and utilities within the image can run natively on this subsystem. [1][2][3]
WSL provides a Linux-compatible kernel interface (without Linux code) developed by Microsoft, which runs on the user-mode binaries from Ubuntu. [4]
The subsystem cannot run all Linux software, such as those of the graphical user interface, and those that require an implementation of the Linux kernel service. [5] However, this can be mitigated with the Graphics X Window System running on the external x server. [6]
This subsystem originates from the ill-fated Astoria Project, which is designed to allow Android apps to run on Windows 10 On mobile. [5 "This feature component is available from Windows Insider Preview build 14316. [7]
-- wikipedia
first open the settings, go to the app, select Programs and features, click Enable or disable Windows features, tick the Windows Subsystem for Linux, and then restart.
In beta we need to enter bash in PowerShell in order to download WSL, and there is no domestic download node, do not support the continuation of the breakpoint, so once the network instability is discarded. In the 1709 version of WINDOWS10, we can go to the store to search Ubuntu for download, now not only Ubuntu, but also SuSE and openSUSE. (Is it weird to download Ubuntu in the Windows Store W (? Д?) W
After the installation is complete we can toss it, and someone might wonder how to use the files on Windows? In fact, the Windows directory is all mounted in/mnt This directory, we can see in the/MNT/C directory of C-drive files. OK, let's run the Screenfetch to see it.
As a Java web Developer, the usual is probably ssh,git,jdk,tomcat,nginx and so on. Let's hit test it.
Ssh
We can see that SSH remote connection can be used normally, so putty or xshell this kind of thing can unload (escape
Git
The various commands of git are also normal.
Jdk
Next Test the JDK, let's compile a small piece of code to try and see if the JDK is OK.
Tomcat&nginx
is it amazing that we started Tomcat and then accessed it in the Edge browser to see the default homepage of Tomcat? Of course, Nginx is not a problem.
In addition, GCC and clang have been tested and can be used, which is no longer shown here.
It is said that the gods have been able to run graphical Linux programs on the WSL, which I have not tested, interested in small partners can self-toss.
What if we mess up the environment inside the WSL? Thanks to the benefits of the Windows store, we just need to uninstall and re-download in the store.
Finally, I think WSL is absolutely great for developers of Windows platforms, on the one hand, some of Linux's best tools can be used on Windows platforms, and on the other hand, programs developed on Windows can be deployed directly to WSL for testing, This will ensure that the development environment and production environment are as similar as possible. All right, Enjoy it!.
(BTW, post a few WSL of relevant information, interested in the small partners to read the study themselves.)
Release Notes:
Https://msdn.microsoft.com/en-us/commandline/wsl/release_notes
Blog of the WSL team:
https://blogs.msdn.microsoft.com/wsl/
Issue Tracker:
Https://github.com/Microsoft/BashOnWindows/issues
WSL (Linux subsystem on Windows)