WSL 2 enables Linux GUI applications to feel native and natural to use on Windows. You can now integrate both Windows and Linux applications into your workflow for a seamless desktop experience.
6 Answers. In earlier iterations of Windows Subsystem for Linux, the Ubuntu file system was at %localappdata%\Lxss (e.g., C:\Users\Username\AppData\Local\Lxss - replace the Username with your Username on Windows). See the WSL blog post on File System Support: The primary file system used by WSL is VolFs.
Where are WSL files stored? WSL files are exposed through a network share \\wsl$\[distro name], for example my home directory is at \\wsl$\Ubuntu-20.04\home\pawelb. C:\Users\pawelb\AppData\Local\Packages\CanonicalGroupLimited.
Install
- Follow the usual installation instructions to install Docker Desktop.
- Start Docker Desktop from the Windows Start menu.
- From the Docker menu, select Settings > General.
- Select the Use WSL 2 based engine check box.
- Click Apply & Restart.
- Ensure the distribution runs in WSL 2 mode.
To enable VMs, you need to go to Control Panel>Programs>Turn Windows Features on or off. This will open a dialog box and you can scroll down to Virtual Machine and select the checkbox. Once done, click Okay and Windows will download some files and set up Virtual Machine.
Verify that you are running WSL Version 2
- Open Command Prompt from the Windows search bar.
- Run the following command: wsl -l -v.
- If your version states version 1, you might need to take an additional step to update Ubuntu. Enter the following command (replace Ubuntu-20.04 with the actual version you installed):
While WSL 2 actually uses the Linux kernel running under Hyper-V, you won't have as much of a performance hit than with a VM because you aren't running most of the other processes that run on a Linux system. WSL also integrates much more fully into Windows than a regular VM in VirtualBox does.
We recommend that you use WSL 2 as it offers faster performance and 100% system call compatibility. However, there are a few specific scenarios where you might prefer using WSL 1. Consider using WSL 1 if: Your project files must be stored in the Windows file system.
The WSL 2 hypervisor is similar to that used by the Windows Sandbox, letting Windows and Linux share the same timers to avoid one OS dominating the other. That allows Linux files to be hosted in a virtual disk with a Linux native ext4 file system using the 9p protocol for interactions between Windows and Linux.
2 Answers
- First list your distribution. C:\WINDOWS\system32>wsl --list. Windows Subsystem for Linux Distributions: Ubuntu-18.04 (Default)
- And then set it to version 1. C:\Users\priv>wsl --set-version Ubuntu-18.04 1.
To terminate a Running WSL Linux Distro in Windows 10,
- Open a new command prompt.
- Type the following command: wsl --terminate <DistributionName> . Alternatively, you can use this shorten syntax: wsl -t <DistributionName> .
- The WSL Distro is now terminated.
To install WSL using Setting on Windows 10, use these steps:
- Open Settings.
- Click on Apps.
- Under the "Related settings" section, click the Programs and Features option.
- Click the Turn Windows features on or off option from the left pane.
- Check the Windows Subsystem for Linux option.
- Click the OK button.
WSL2 will revolutionize your web development. It makes it easy to write code using Windows tools then run it in a Linux environment. While it was previously possible with virtual machines and Samba folder shares, WSL2 offers a simpler, faster, and highly integrated experience.
WSL1 enables Linux binaries to run on Windows using a compatibility layer which translates the Linux system calls into windows system calls. The WSL2 hypervisor lets windows and Linux share the same timers without dominating the other. That allows Linux files to be hosted in a virtual disk.
Install WSL on Windows 11
- Open Start on Windows 11.
- Search for Command Prompt, right-click the top result, and select the Run as administrator option.
- Type the following command to install the WSL on Windows 11 and press Enter: wsl --install.
- Restart your computer to finish the WSL installation on Windows 11.
You can install Linux alongside Windows in
dual boot mode. This method allows you to choose either Linux or Windows when you start your computer.
Using Linux commands inside Windows
- Use Linux Bash Shell on Windows 10.
- Use Git Bash to run Bash commands on Windows.
- Using Linux commands in Windows with Cygwin.
Open the start menu and search for “Turn Windows features on or offâ€, then click and open it. Now, Scroll to the bottom end and enable “Windows Subsystems for Linuxâ€. As soon as you click on the ok button, Windows downloads any necessary files and installs Linux subsystem.
Creating a virtual machine
- Open Start.
- Search for Hyper-V Manager and click the top result.
- Click on the Action menu.
- Select New and click on Virtual Machine.
- Click the Next button.
- Enter a descriptive name for your virtual machine (e.g., vm-ubuntu).
Ubuntu is based on the Linux kernel, and it is one of the Linux distributions, a project started by South African Mark Shuttle worth. Ubuntu is the most used type of Linux based operating system in desktop installations. Linux operating system is based on this kernel which Linus Torvalds crafted.
- Step 1: Download Ubuntu. Before you do anything, you have to download Ubuntu.
- Step 2: Create a live USB. Once you have downloaded Ubuntu's ISO file, the next step is to create a live USB of Ubuntu.
- Step 3: Boot from the live USB. Plug in your live Ubuntu USB disk to the system.
- Step 4: Install Ubuntu.
How to Enable the Linux Bash Shell in Windows 10
- Navigate to Settings.
- Click Update & security.
- Navigate to the Control Panel (the old Windows control panel).
- Select Programs and Features.
- Toggle "Windows Subsystem for Linux" to on and click Ok.
- Click the Restart Now button.
Try Mint out
- Download Mint. First, download the Mint ISO file.
- Burn the Mint ISO file to a DVD or USB drive. You're going to need an ISO burner program.
- Set up your PC for an alternative bootup.
- Boot up Linux Mint.
- Give Mint a try.
- Make sure your PC is plugged in.
- Set up a partition for Linux Mint from Windows.
- Boot into Linux.