In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, the editor will bring you what are the skills of running Linux directly on the Windows system. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.
In order to run Linux programs on previous Windows10 systems, it is more complex to use tools such as cygwin, which not only download slowly, but also have limited functions. Later, virtualization software such as VirtualBox,VMWare Workstation and Microsoft Hyper-V emerged, and you can install and simulate a complete Linux system on windows, so that you can run Linux programs directly in a virtual machine. Microsoft launched WSL after version 1703. WSL2 based on Hyper-V technology will also be introduced in version 2004.
What is WSL?
WSL (Windows Subsystem for Linux), which is the Linux kernel compatibility layer of Windows. In order to distinguish from WSL2, which is about to be officially launched, WSL is now also called WSL1.
By allowing users access to Linux bash command-line applications, many Linux programs can be run directly within Windows. WSL 1 allows Windows users to install a full Linux distribution, such as Ubuntu,openSUSE,Kali or Debian, but it is worth noting that it cannot directly execute GUI (such as Gnome,KDE, etc.) because it does not have GPU support. WSL1 doesn't actually have a Linux kernel, so you can't test drivers or Linux kernel extensions. Also unable to run 32-bit Linux applications..
WSL 2 is a new version of WSL with a completely new structure that allows Linux to run ELF64 Linux binaries on Windows. This new architecture changes the way Linux binaries interact with Windows and computer hardware, but still provides the same user experience as WSL 1. A single Linux distribution can run either as a WSL 1 distribution or as a WSL 2 distribution, can be upgraded or downgraded at any time, and can run WSL 1 and WSL 2 distributions in parallel. WSL 2 uses a completely new architecture of the real Linux kernel.
Install WSL1
1. Right-click the start button to open PowerShell as an administrator:
two。 Enter the following command and press enter:
Enable-WindowsOptionalFeature-Online-FeatureName Microsoft-Windows-Subsystem-Linux
The installation process will prompt whether to restart the computer to complete the operation, and hit enter to restart.
3. After restarting, you can check whether the Windows feature has been successfully installed by turning it on or off through Control Panel >. Of course, you can also directly open the Windows subsystem here, without the command to open it.
4. Next, you need to go to the Windows App Store from the start menu and select the Linux distribution. We will use Ubuntu, click Ubuntu 18.04 LTS and then "install".
5. After installation, the install button changes to start, and click the start button. After waiting for further installation, the window prompts for the UNIX user name and password and follow the prompts on the screen.
6. The WSL1 + Ubuntu environment is installed, and the bash prompt is displayed, which you can open by opening "Ubuntu" in the start menu.
Install WLS2
Because WLS2 compared with WLS, in addition to having a "real" Linux kernel, the file system is faster, another major change is based on Hyper-v technology, that is, if you run WLS2, you need to turn on Hyper-V, which leads to other third-party virtual machines like VWWare can not run (VirtualBox 6.0 + can achieve coexistence with Hyper-V), which is also a small pity.
1. Open CMD or Powershell as an administrator, and after entering the command below, select Y to restart the computer
If dism.exe / online / enable-feature / featurename:VirtualMachinePlatform / all does not have wsl 1 installed, you also need to:
Dism.exe / online / enable-feature / featurename:Microsoft-Windows-Subsystem-Linux / all / norestart
two。 After restarting the computer, run cmd with administrator privileges, and then type
Wsl-l-v
You can see that 1 is displayed under the Version, which means that our WSL2 is not open yet.
3. To upgrade to wsl 2, enter the following command in CMD:
Wsl-- set-version Ubuntu-18.04 2
Note that Ubuntu-18.04 is the name shown in Name in the previous step. If you do not install Ubuntu 18.04, you need to fill in the corresponding version.
How do I access the Windows folder?
In WSL, it is very convenient to access the data on the actual hard disk, and the Windows partition is mounted on WSL by default.
The mount points of Windows disks have been mounted automatically.
In WSL, enter cd / mnt/ to enter the corresponding partition.
For example, if you access disk C, you can type
Cd / mnt/c/ can enter C disk.
These are the skills of running Linux directly in Windows system shared by Xiaobian. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.