Mac and Linux are considered to be POSIX, but Windows is not. Windows Subsystem for Linux as a theoretical chemistPOSIX is a classification of a type of operating system. Microsoft team took notice and introduced the Windows Subsystem for Linux , which, as the name suggests, is a virtual layer that can house almost-fully-featured Linux. Enter Windows Subsystem for Linux The criticism we’ve outlined above is pretty harsh and it may seem that Windows is unsuitable even for a simple Hello world page.Using WSL will provide the kind of environment most familiar to Mac users.Answer (1 of 4): Sure, it is called a virtual machine, or docker. This means that you can run bash, with whichever specific Linux distribution you choose, integrated right inside Windows. Windows Subsystem for Linux (WSL) can now be installed to support running a Linux shell within Windows.We use for example SSH, python, fortran compilers and a lot of quantum chemistry software designed for Unix. Consequently in order to work decently we need a Unix type OS. It’s because a lot of programs used in quantum chemistry were designed for Unix type OS. Why ?In my lab a lot of people use Linux whereas others use macOS. They would either get the Published: MaWindows Subsystem for Linux as a theoretical chemist Windows Subsystem for Linux.
It seems to be the best of two worlds (I also use macOS in my office). I have also experimented drivers issues with printers and GPU.This is how I schematize things if I must make OS ranking.So I understand why many of my colleges choose macOS. There is also a big lack of compatibility with many common GUI programs. There are a lot of great shells like bash compared to Windows and its cmd (even though I can admit that Microsoft has made a big effort with Windows PowerShell) I am still not convinced by the graphical user interfaces present on Linux. ![]() So how does it work ? This is thanks to the magic of a technology called pico processes. They attend to interact with a Linux Kernel. Because the binaries are Linux binaries. It’s magic ! No it’s Linux => Windows syscalls conversion.A syscall is the way that a program interact with the kernel to ask it for something (Like open a file, write on a file, request memory allocation…). Inside a true Linux environment and you can interact with your Windows files in it. And so you can run native Linux programs and Windows programs. Install font for all aplications macSo the WSL pico provider ( lxss.sys) provide all the kernel interface to convert Linux syscalls to Windows kernel equivalent syscalls. It provide the interface between the kernel and the pico process. No Windows dll has loaded, also a pico provider which is a kernel-mode driver is placed between the Windows kernel and the pico process. Windows Subsystem For Linux Vs Windows 10 You MustSystem typeIf you have a 64Bits OS but an older version of Windows 10 you must update your OS. We must have the above configuration. Prerequisites to install WSLA 64Bits operating system (x86-64 or arm64)Windows 10 fall creator update or greaterYou can check your system configuration in the About page of the settings App. So this links work only on Windows 10. How to install it on your machineFor the installation process I added direct links to Windows 10 settings App pages and Microsoft store pages when its relevant to simplify your installation process. Each following section presents a way to install WSL. You can install it in different ways. You can use Windows Update from the Windows Settings app to update your Windows 10 version for free.Check for update now Install the Windows Subsystem for Linux optional featureWSL is distributed as an optional feature of windows 10. So it’s may be the simpliest way for you. By command lineGenerally people who want to install WSL are comfortable with command line interfaces. If you are not the administrator of your PC you must ask him to install it. It doesn’t matter.To install a Windows feature an administrator account is required. A Linux program can also get the Windows 10 build number by this mean.The Linux distributions distributed on the Microsoft Store are published by it’s maintainers and are almost the same as the ISO distributed versions (But without graphical programs by default and for Kali Linux without pentest programs) we can download all programs supported by a distribution with its packages manager thanks to programs being downloaded on the same repositories. This is the way that a Linux program can see that is currently running on WSL and not a real Linux OS. Set your Linux username and password (It can be different to your Windows user name and passwords.)After you can play with the Linux distribution you have chosen and you can install and run programs from the Linux world in it exactly like a true Linux OS.If you are not convinced that this is a real Linux environment you can type the following line of code on the distribution consoleLinux 4.4.0-Microsoft #1-Microsoft x86_64 x86_64 x86_64 GNU/LinuxYou can see that is not a Linux generic kernel but it’s considered as a Linux Microsoft kernel. The distribution was present as taball file inside the app and at the first launch it was automatically extracted and the app ask you to create a user account. Download distribution from the storeAt this point the Windows Subsystem for Linux optional feature may be installed.An administrator account is no longer required.Now go to the WSL page on the Microsoft store to chose your distribution and download the associated app.You can install and use multiple distros at the same timeAfter the app installation, launch it. For that press shift key and right click. Since October 2018 update it’s also possible to launch the default distro from Windows explorer. Launch the distro app you installed previously to open a console window with this distro. It’s also possible to compile from source on WSL and distribute the binary on the Web ( But by precaution and may be excess of caution I recommend you to test it on a real Linux OS).Official installation guide Launch WSL From graphical user interface All syscalls are not implemented. No GPU access. I have not really used Cygwin in real situations, therefore I have no idea of it’s performances.Very good interop because it’s Windows binariesBad performance because hardware has emulated and we can give just a part of the machine to the VMLxss.sys (a Linux compatibility layer driver in kernel mode). Change distribution launch behaviorYou can configure the wsl functionalities of a distro in the in the /etc/wsl.conf fileAn overview of WSL and its alternative which I have tested on windows. So all syscalls are handled.Cygwin1.dll (A POSIX compatibility layer dynamic library in user mode) and the Windows kernelEven if a bare-metal Linux install (on the hard disk) is the best choice for those who want to run Linux binaries only, those who dislike Linux GUI or have drivers problem on Linux but want a Linux command line interface or want to run Linux binaries, WSL is probably an excellent choice.
0 Comments
Leave a Reply. |
AuthorKelly ArchivesCategories |