Ever heard of WSL?? Windows Subsystem for Linux! This basically helps you run Linux binary executables on Windows 10 and Windows server 2019.WSL let developers run a GNU/Linux enviroment - inculding most command-line tools,utilities,and application directly on windows 10,unmodified with any virtual machine or dual boot setup.
You can:
- Choose your favourite GNU/Linux distribution from the Microsoft store.
- Run command-line such as grep,sed,awd or other ELF-64 binaries.
- Run bash shell scripts and GNU/command-line applications including:
- Tools like vim,emacs,tmux
- Languages like C,C++,C#,Ruby,Python,Go,Rust,NodeJS,etc
- Services like SSHD,Mysql,Apache,Lighttpd,MongoDB etc
- Install additional software using own GNU/Linux distribution package Manager
- Invoke windows application using Unix like command-like shell.
- Invoke GNU/Linux application on windows.
WSL 1:
WSL verion 1 was initially released on 2nd August 2016. WSlL 1 is able to run some graphical applications(such as Mozilla Firefox), by installing X11 server within windows (host) environment(such as VcXsrv or Xming), although not with caveats, such as lack of audio or hardware acceleration(resulting in poor graphics performance).
Also it is not capable of running all Linux software, such as 32-bit binaries or those that require specific kernel services. Due to lack of any "real" Linux kernel in WSL version 1kernel modules, such as devices drivers can't be run. However, WSL version 2 makes use of live virtualized Linux kernel instances.
Microsoft stated that WSL was designed for the development of application and for desktop computers or production services.
SYSTEM REQUIREMENTS FOR WSL VERSION 1:
Before installing WSL, make sure your computer meets the following minimum system requirements:
- You must be running Windows 10 version 1607 or above
- WSL will only run in 64-bit version of Windows 10. 32-bit version is not supported.
- Open you settings. You can do it by clicking the gear icon on start menu or by opening Power user task menu and choose Settings.
- In settings choose system.
- On left side of System choose, choose About.
- On the right of window, system information is displayed. MMake sure version is at least 1607 and the system type is 64-bit operating system.
WSL 2:
Microsoft, on 6 May 2019, announced WSL 2, which features completely new VM-based backend(based on a subset of Hyper V Features).It was introduced with many major changes such as Linux kernel etc. The new version of Windows Subsystem architecture powers Windows Subsystem for Linux to run ELF 64 Linux binaries on Windows. Its primary goals are to increase file system performance, as well as adding full system call compatibility.
The new architecture changes how these Linux binaries interact with Windows and your computers hardware, but still provides the same user experience as in WSL version 1.
Support of OpenCL and CUDA is not being implemented currently, although planned for future releases.
SYSTEM REQUIREMENT FOR WSL VERSION 2:
To install WSL version 2, you need following requirements:
- Windows 10 Insider Preview Build version 19041 or above.
- WSL 2 will be, generally available for windows 10, version2004.
- A computer that supports Hyper-V visualization.
HOW TO INSTALL WSL ON WINDOWS 10:
- Open Power shell as administrator and run the following command:
- Some necessary software will download and WSL will be enabled after you reboot your system.
- When the download is complete, powershell will ask you if you are ready to reboot your computer. Before rebooting, make sure all of your important documents are saved and all other applications are closed.
- After you computer reboots open the command prompt or powershell and rum the folling command:
- Bash will inform you that no distribution is installed and give you URL for downloading one from windows store.
- Go to windows store and download Linux distribution of your choice. If you are not sure what to pick, we recoomend you to pick Ubuntu.
- Click the distribution of your choice and then click "GET".
- When installation is complete, click on "LAUNCH". It will take few minutes to complete the installation.
Note:
You may receive the following error:
Installing, this may take a few seconds...
Installation failed!
Error: 0x8000000d
Press any key to continue...
This error is a known bug that has occurred for some versions of windows 10. If you get this error, you can fix it by repeating first two steps and then continue with step steps mentioned below.
- Ubuntu is now installed and WSL is enabled. You can enable WSL ubuntu command prompt by clicking on the launch button on the windows store or in the start menu by choosing UBUNTU. You can also open command prompt and run bash.
- The first time you launch a newly installed Linux distribution, a console window will open and you will be asked to wait for a minute or two for the files to de-compress and store it on your PC. All further launches must take less than a second.
- You will the need to create a user account and password for your Linux distribution.
UPDATE TO WSL 2:
Before updating, make sure you update the windows version if it is lower that 19041.
- Enable the Virtual-Machine Platform optional component. To do so open powershell as administrator and run:
- Restart your computer.
- Download WSL 2 kernel update(required)
- Double-click the wsl_update_x64.msi file and apply the update.
- Now open powershell and type the following command:
Comments
Post a Comment