Are there any limitations in working in Ubuntu in Windows Subsystem for Linux on Windows 10? [closed]
Are all of Ubuntu's capabilities including support for GUI applications available in the latest version of Windows Subsystem for Linux installation of Ubuntu or are there any limitations in working in Ubuntu in Windows Subsystem for Linux on Windows 10?
Solution 1:
The limitations Ubuntu in Windows Subsystem for Linux on Windows 10 are less and less over time and changing from being limitations due to missing functionality in WSL to limitations due to Ubuntu's learning curve.
Integration between Windows and Linux
The Windows Subsystem for Linux (WSL) is continuously improving integration between Windows and Linux. You can:
- Run Windows tools (i.e. notepad.exe) from a Linux command line (i.e. Ubuntu).
- Run Linux tools (i.e. grep) from a Windows command line (i.e. PowerShell).
- Share environment variables between Linux and Windows. (Build 17063+)
Run Linux binaries from the Windows Command Prompt (CMD) or PowerShell using wsl <command>
(or wsl.exe <command
> ). Binaries invoked in this way:
- Use the same working directory as the current CMD or PowerShell prompt.
- Run as the WSL default user.
- Have the same Windows administrative rights as the calling process and terminal.
The Linux command following wsl (or wsl.exe) is handled like any command run in WSL. Things such as sudo, piping, and file redirection work. source
Mount ext4 filesystems
Starting with Windows Insiders preview build 20211, WSL 2 will be offering a new feature: wsl --mount
. This new parameter allows a physical disk to be attached and mounted inside WSL 2, which enables you to access filesystems such as ext4 that aren't natively supported by Windows from Windows File Manager and PowerShell.
GPU Compute, WSL Install and WSL Update arrive in latest Insider build for WSL 2
GPU support for WSL arrived in the Dev Channel preview of Windows 10 build 20150 under Microsoft's reorganized testing structure, which lets it test Windows 10 builds that aren't tied to a specific future feature release. Microsoft announced upcoming GPU support for WSL a few weeks ago at Build 2020, along with support for running Linux GUI apps. The move on GPU access for WSL is intended to bring the performance of applications running in WSL2 up to par with those running on Windows. GPU compute support is the feature most requested by WSL users, according to Microsoft. The 20150 update includes support for Nvidia's CUDA parallel computing platform and GPUs, as well as GPUs from AMD and Intel. It also supports DirectML (Direct Machine Learning), Microsoft's Windows 10 API for hardware-accelerated machine learning. Slashdot
What's coming to WSL
Install WSL with a single command
One common complaint about WSL is that it's not easy to find and enable. Microsoft is working on some improvements to the wsl.exe command-line tool to help you install WSL. Soon you will be able to simply install WSL by entering: wsl.exe --install
in your command-line.
This command will be added to every Windows machine so that all you need to do is open a Terminal window elevated with administrator privileges and run wsl.exe --install
. From there the WSL optional components will be enabled, and your specified distro will be downloaded and installed for you automatically upon restart.
You can expect to see initial releases of this feature in the next few months in the Windows Insiders Fast Ring.
WSL 2 will be the new default when installing for the first time
We're also introducing the change to make WSL 2 the new default distribution type when installing WSL for the first time. WSL 2 brings significant improvements and we found that the majority of our users on Insider branches are using WSL 2 distros. When developing wsl.exe --install
it made sense for it to default to what people are using: WSL 2, and we've included this as well for any new installations of WSL when enabling the 'Windows Subsystem for Linux' optional component. You'll see these changes in the Insiders Fast ring in the next few months alongside the wsl.exe --install
improvement.
WSL will support GPU Compute workflows
Adding CUDA and/or GPU Compute support to WSL has been our #1 most requested feature since our first release! Over the last 3+ years, the WSL, Virtualization, DirectX, Windows Driver teams, and our silicon partners have been working hard on a complex engineering feat to deliver this capability.
This is why we're thrilled to announce that we will start previewing GPU compute support for WSL in Windows 10 Insider builds within the next few months.
Initially, the GPU compute capability will support two scenarios:
- NVIDIA CUDA
- Supports existing Linux tools & workflows used by professionals
- DirectML
- Initially targeting beginners and students, leveraging DirectX 12 capable GPUs from several vendors
- The team will be releasing a preview package of TensorFlow with a DirectML back-end enabling hardware agnostic acceleration of AI & ML workloads across the breadth of Windows hardware – DirectML will also support native Windows too, including TensorFlow on Windows.
Once this preview is released, you will simply need to ensure that you have the latest Windows Insider Fast build, WSL 2 installed, install the correct driver for your GPU from the hardware vendor, and then you'll be ready to start developing, training and testing your machine learning and AI models inside of WSL.
This change will be released to the Windows Insiders Fast ring in the next few months. For all the details of what this change means and how it was made possible, please read the DirectX Developer blog post.
Adding Linux GUI app support to WSL is on our roadmap
Microsoft is making the promised support for Linux graphical user interface (GUI) apps on Windows 10 available to customers as of the next Windows 10 release, officials said on May 25.
One of our other most prolific requests is to support not just command-line apps, but Linux GUI apps as well. For example, some users want to run their preferred Linux GUI text editor or IDE in a Linux environment and work on their code stored locally within their distro's filesystem, or simply develop Linux GUI apps on their Windows machine.
Our goal is for you to be able to run Linux GUI apps on your desktop seamlessly alongside your Windows apps. This will enable you to use Linux apps to edit, build, and run your code, visualize data plots in Python, or even use applications that are optimized for a Linux environment.
At BUILD we demonstrated an early version of this work, running a few GUI sample apps directly from WSL such as Eye of Gnome
, gedit
and the mpv
media player. These apps connected to a wayland server running inside of WSL, which communicated with a RDP client on the Windows host. You can see a screenshot of this in action below where we're running the GNOME file manager in WSL and Outlook side by side.
These changes are on the WSL's team roadmap and you can expect to hear more about this work by the end of 2020, at which time this answer will be updated.
Source: The Windows Subsystem for Linux BUILD 2020 Summary