Methods of payment Abuse

Installing WSL 2 in Windows 10

06.07.2024, 21:11

WSL 2 (Windows Subsystem for Linux 2) is an environment for running the Linux operating system on Windows 10 computers. It is an improved version of the previous WSL and provides the ability to run Linux applications and commands directly from the Windows command line, without having to install a separate virtual machine.

WSL 2 is based on virtualization and uses a built-in hypervisor to run the Linux kernel. This allows for better compatibility, performance and the ability to use official Linux images, making WSL 2 a powerful tool for developers and system administrators.

What tasks does it perform?

WSL 2

WSL 2 performs the following tasks:

  1. Running and executing Linux applications: provides the ability to run and use Linux applications and commands such as Bash, SSH, Git, Python, and others directly from the Windows command line.
  2. Development and Testing: WSL 2 provides an environment for developing, testing, and debugging Linux applications. Developers can use Linux programming tools and languages on their Windows computers.
  3. Access to Linux tools and features: allows you to import Linux tools and features that may not be available on Windows. This includes advanced command line capabilities, batch managers, runtime environments, and other tools.
  4. Windows integration: provides integration between Linux and Windows. This means you can easily share files and data between systems, utilize network resources available on Windows, and integrate Linux applications into your Windows workflow.
  5. Updates and security: It offers regular security updates to ensure that your Linux environment is safe and stable to use on Windows computers.

These are some of the tasks that WSL 2 performs, but it also provides other features, depending on the user's needs and goals.

WSL 2 installation instructions

To install WSL 2 on Windows 10, follow these steps:

  1. Make sure your operating system is Windows 10 version 2004 or later. You can check your Windows 10 version by right-clicking on the Start button in the lower left corner of your screen, selecting "System" and looking under "System Information".
  2. Open Windows "Preferences" by pressing the Win+I keyboard shortcut, or look for the "Preferences" icon on the Start menu.
  3. From the "Preferences" menu, select "Update & Security" and then click on "Check for updates". Make sure your operating system is fully updated.
  4. Open Windows "Settings" again and select "Applications."
  5. Under "Apps and Features", select "Settings Manager" and enable the "Developer" option if it's not already enabled.
  6. Open Windows Settings again and select "Update and Security."
  7. From the "Update and Security" menu, select "For Developers" and check the "Developer Mode" checkbox.
  8. Go to the "Control Panel" of Windows, find and select "Programs" and then select "Enable or disable Windows components".
  9. In the "Windows Features" window, find "Windows Subsystem for Linux" and check the box next to it. Then click "OK."
  10. Go to the Microsoft Store and find the Linux distribution you want to install (like Ubuntu, Debian, or any other). Click on it and select "Get" or "Install"
  11. Run the WSL program you installed and follow the instructions to set up and configure your new Linux environment.

You should now have WSL 2 installed on Windows 10, and you can use Linux distributions within your operating system.

How to uninstall WSL 2

To uninstall WSL 2 (Windows Subsystem for Linux 2) from Windows 10, you need to follow a few steps:

  1. Open PowerShell as administrator: right-click on the Start button and select "Windows PowerShell (administrator)".
  2. Run the command to disable WSL Subsystem 2: Type the following command and press Enter:
    wsl --set-version <distributeve_name> 1
  3. Replace <distributeve_name> with the name of the Linux distribution you are using (for example, Ubuntu).
  4. Remove the Linux distribution: Type the following command to remove the Linux distribution and press Enter:
    wsl --unregister <distributeve_name>
  5. Here also replace <distributeve_name> with the name of your distribution.
  6. Uninstall the WSL 2 service: run Windows services(services.msc) and find the"LxssManager" service. Right click on it and select "Stop".
  7. After that, select "Properties" and change the startup type to "Disabled".

Once these steps are finished, WSL 2 will be removed from your system. Please note that uninstalling WSL 2 will cause you to lose all data and files that have been saved in your Linux distribution, so make sure you don't have any important information to save before uninstalling.