Brief Introduction and installation of WSL (Linux subsystem on Windows), wsllinux

Source: Internet
Author: User
Tags tools and utilities git commands creators update

Brief Introduction and installation of WSL (Linux subsystem on Windows), wsllinux

WSL, Windows Subsystem for Linux, is the previous Bash on [Ubuntu on] Windows (well, Microsoft renamed KPI ++). In the wsl environment, we can run some Linux programs.

First of all, in fact, Windows 10 was added to wsl during the First Anniversary Update (1607, internal version 14393), but it was still updated by the new autumn creators (1709, internal version 16299), wsl was officially removed from beta and gradually stabilized, so I chose to write this article at this time. The following content is based on the autumn creators Update (1709, internal version 16299.19 ).

Next, we will officially introduce and install wsl.

Windows Subsystem for Linux(AbbreviationWSLIs a compatible layer for native Linux binary executable files (ELF format) on Windows 10. It was developed by Microsoft and Canonical to enable the pure Ubuntu 14.04 "Trusty Tahr" image to be downloaded and decompressed to the user's local computer, in addition, tools and utilities in the image can run native on this subsystem.[1][2][3]

WSL provides a Linux-compatible kernel interface (excluding Linux code) developed by Microsoft. binary files in user mode from Ubuntu run on it.[4]

This subsystem cannot run all Linux software, such as those graphical user interfaces and those that require unimplemented Linux kernel services.[5] However, this can be mitigated by using the graphic X Window System running on the external X server.[6]

This subsystem originated from the life-saving Astoria project to allow Android applications to run on Windows 10 Mobile.[5] This function component is available from Windows 10 Insider Preview build 14316.[7]

--Wikipedia

First, open the settings, enter the application, select Programs and functions, click enable or disable the Windows function, select the Windows subsystem for Linux, and then restart.

During beta, we need to enter bash in powershell to download wsl. In addition, there are no domestic download nodes and resumable data transfer is not supported. Therefore, once the network is unstable, it will be discarded. In Windows 10 of version 1709, we can go to the store to search for Ubuntu for download. Now there are not only Ubuntu, but also SUSE and openSUSE. (Is it strange to download Ubuntu in the Windows Store? w

After the installation is complete, we can get involved. Some people may wonder how to use files on windows? In fact, all windows directories are mounted under the/mnt directory. We can see various files on the c drive in the/mnt/c directory. Okay. Run screenfetch first.

As a java web developer, ssh, git, jdk, tomcat, and nginx are commonly used. Let's test it one by one.

SSH

We can see that ssh remote connection can be used normally, so putty or xshell can be uninstalled (Escape

 Git

Git commands are also normal.

JDK

Next we will test jdk. Let's compile a short piece of code and try it. We can see that jdk is no problem.

Tomcat & Nginx

Start tomcat and access it in the Edge browser to see the default homepage of tomcat. Is it amazing? Of course, nginx is no problem.

In addition, gcc and clang can also be used after tests, which will not be shown here.

It is said that the great gods have been able to run graphical Linux programs on wsl. I have not tested this, and interested friends can do it on their own.

What if we make the environment in wsl messy? Thanks to the benefits of the Windows Store, we only need to uninstall and download it again in the store.

Finally, I think wsl is definitely a great benefit to windows platform developers. On the one hand, some of the tools that are useful on linux can also be used on windows platform. On the other hand, programs Developed on windows can be directly deployed to wsl for testing. This ensures that the development environment and production environment are as similar as possible. Okay, Enjoy it!

(Btw, posted a few wsl related information, interested friends read the study on their own.

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.