Experience. net core cross-platform system environment: Install Windows 10 Built-in Linux subsystem, corewindows10
It seems that it is time to learn about. net core, although it still has a lot to do with the rewrite of. net4.x. In order to make the. net cross-platform ms work hard this time (why did I leave it early ?); The so-called cross-platform, which sounds very 6b, mainly involves two platforms. Windows is the home of. net, and Linux is the new environment to adapt.
Previously try to use hyper-v installed ubuntu, compare card (notebook AUSU i7-4710HQ 12 gb ram, assigned 4 Processors 4 gb ram), window resolution not adjustable, high DPI scaling is very awkward ...... It is estimated that ms does not intend to optimize the desktop experience of hyper-v; in addition, after the virtual network switch that shares the network with the added virtual network switch enables the virtual machine to connect to the Internet, it is impossible to directly use the blue-light wall proxy outside, I don't know what this is ). I suddenly remembered that ms had said that it would join the linux subsystem in win10 last year, so I searched for it.
Restrictions
This function is available in Windows 10 and later. To enable Bash on Windows, you must first enable the computer CPU to support virtualization technology. You can choose Task Manager-performance tab to view the following information:
Enable
1. Enable the developer mode: Go to Start-set-Update-developer:
2. Enable windows Subsystem for Linux in Control Panel-programs and functions-Add/Disable Windows functions (currently a Beta version );
You will be asked to restart later.
Install
This is the most pitfall step.
After the system is restarted, set the system region to the United States, enable cmd or powershell, and enter the lxrun/install/y command to start online installation. During this period, the user name and password will be required (unable to install ), the download speed is very slow (the speed of the region set to the United States is significantly improved under the 100 MB optical fiber, but it is still very slow). If you only prompt that the server connection fails, there are two options: 1 is to open the agent (tested my company network needs blue light), 2 is to refer to here (https://www.varunagw.com/how-install-windows-subsystem-linux-bashonwindows-offline-windows/) set offline installation (not tested ).
// Last night's Build 2017 introduced windows rs3. After the update, you can directly download three different versions of Linux in the store. Please use this method.
Use
After the installation is complete (hopefully everyone can install it successfully), the Start menu will contain an example named "Bash on Ubuntu on Windows", pointing to bash.exe in the system folder; open this bash and find it is a command line, run the following Linux commands:
We used cat/proc/version to check that the Linux kernel version we just installed is 4.4.0. Then we obtained the Ubuntu 16.04.2 LTS with the release version of xenial through lsb_release-a, which is a popular version.
The terminal window opened by bash by default supports copying and pasting. We recommend that you enter bash in PowerShell to open the window (note that the default path is different when the two methods are opened ).
Try to install and use the application screenfetch (to see the logo, ^ _ ^, of course, I still want to install the dotnet core Environment ):
It is inevitable that the installation package will fail to be downloaded (almost no one-time installation has been performed, and tianchao's network needs to be tried several times). It is much easier to get the root permission through su passwd.
The user experience is satisfactory, which is much better than Hyper-v.
Continue Exploration
- Through commands such as ifconfig, ping, and curl, it is found that the subsystem directly enjoys the network configuration of the external main system, and other sharing features and are not within my research scope for the time being.
- The sub-system is installed in Uses \ User Name \ AppData \ Local \ lxss by default. The installation path can be changed without command parameters; however, I think you can change the drive letter indirectly by moving the user folder (try it when the system disk is full. If you have tried it, please let us know the result ).
- By default, the subsystem is mounted with all drive letters (lxss/mnt, which can be read and written) of the primary system. You can create files (folders) that are case-sensitive and can be viewed in windows Resource Manager, however, by default, only the upper-case ones can be opened. Note When deleting them.
- Add more ......
About GUI desktop (not recommended)
By default, this subsystem does not contain the desktop environment. First, it does not need to occupy resources. Second, it is the limitation of this subsystem. It is recommended that you start using the vm to experience the Linux Desktop. If you want to use it here, you need to install Xming in external windows, and then run applications with GUI (such as FireFox) in bash) add DISPLAY =: 0 (for example, DISPLAY =: 0 FireFox) in front of the command to DISPLAY the GUI in Xming, and so on. The desktop is also a GUI application, you only need to install a set of desktops (such as Xfce4) and execute the same command. It is estimated that this will be very difficult.
Next
Now we can officially start using. net core ......
Https://www.microsoft.com/net/core#linuxubuntu
Original path: http://www.cnblogs.com/CameronWu/p/6822008.html