Windows Subsystem for Linux (WSL) One, Windows 10 ve Windows 11 to its users, Windows directly in the environment Ubuntu popular like Linux offers the opportunity to run distributions.
This feature is useful for developers and system administrators. Windows üzerinde Linux It acts as a seamless bridge between the two operating systems, enabling users to use Windows-based applications and tools seamlessly. WSL 2's use of a more advanced virtualization architecture, performance improvements and full Linux Providing core support makes this tool indispensable especially for software developers, test engineers and IT professionals. Ubuntu on WSL 2 The installation process will be covered step by step, as well as installation, configuration and basic usage tips will be shared.
Windows Subsystem for Linux (WSL) 2
Windows Subsystem for Linux (WSL) 2, Microsoft'a Windows for operating systems Linux is a compatibility layer. WSL 2 is a compatibility layer for Windows users. Linux is a feature that allows users to run their distributions directly on Windows. This way, Linux based software and tools Windows environment, facilitating various development, testing and management operations.
WSL 2is an improved version of the first version, WSL, and comes with two major improvements: support for the native Linux kernel and the ability to run on a virtual machine. These improvements make WSL 2 significantly more performant and compatible than WSL 1. For example, WSL 2 significantly improves file system performance and provides full system call compatibility.
WSL 2 Highlights:
- Real Linux Kernel: WSL 2, Microsoft A real website maintained and regularly updated by Linux This allows users to run more Linux applications and tools without errors and with higher performance.
- Improved File System Performance: WSL 2, offers much higher performance in file system operations than WSL 1. It provides a noticeable improvement especially when working with large projects or using applications that require a lot of file operations.
- Full System Call Compatibility: WSL 2, Linux It eliminates some of the compatibility issues encountered in WSL 1 because it can directly support system calls. This allows developers to Linux It allows you to run applications designed to run on Windows without any problems.
- Easy Integration and Management: WSL 2, works integrated with other features of Windows. For example, via Windows Explorer Linux files can be accessed or popular development tools such as Visual Studio Code can directly support Linux applications.
- Flexible Development Environments: WSL 2, various to developers Linux It allows you to easily switch between deployments and run multiple deployments simultaneously. This makes it easy to manage different test and development environments on the same machine.
Windows Subsystem for Linux (WSL2) Prerequisites
WSL 2′There are some prerequisites to use . These requirements are your system's WSL 2′Ensures that it is equipped and structured to support the WSL 2 Prerequisites for:
1. Operating System Requirements:
- Windows 10: WSL 2 is available on Windows 10 version 2004 (May 2020 update) or later. Build 19041 or later is required.
- Windows 11: Windows 11 supports WSL 2 by default and is available in all its editions.
2. Hardware Requirements:
- 64-bit Processor: WSL 2, is only available on x64 processors. ARM64 devices are also supported, but 32-bit processors based on Intel or AMD are not supported.
- Virtualization Support: The processor must support virtualization at the hardware level. VT-x (Intel) or AMD-V (AMD processors) virtualization technologies must be enabled in the BIOS or UEFI settings.
3. Software Requirements:
- Microsoft Store: WSL 2 ve Linux to set up distributions Microsoft StoreYou must have access to .
- Linux Kernel Update Package: WSL 2 specially prepared for Linux You may need to download and install the kernel package from Microsoft's official page.
4. Updates:
- Windows and Driver Updates: WSL 2Before using , make sure that Windows and system drivers (especially BIOS/UEFI firmware and chipset drivers) are up to date.
Windows Subsystem for Linux (WSL) 2 Installation?
Let's take you step by step through the installation of WSL 10 on your Windows 2 Pro system. WSL 2 allows you to run Linux operating systems directly under Windows, so you can easily do your development and testing. First, let's check if your system supports WSL 2.
Check WSL Support
- Check Windows Version:
- On your keyboard
Win + R
Press the keys. - In the Run dialog box that opens,
winver
type andEnter
Press the key. - In the window that opens, verify that you are running Windows 10 version 2004 (build 19041) or later. You can also use it for Windows 11.
- On your keyboard
Steps for WSL 2 Installation:
- Enabling Windows Features:
- From the start menu, select 'Control PanelGo to.
- Under 'Programs' click 'Programs and FeaturesClick .
- In the left menu, click 'Turn Windows features on or offClick on the 'option.
- Enabling Required Features:
- In the window that opens, 'Windows Subsystem for Linux' and 'Virtual Machine Platform' (Virtual Machine Platform) options and check both boxes.
- Click the 'OK' button to confirm the changes and enable the features.
- Update the System and Restart:
- You will need to restart your computer for these changes to take effect. Any necessary updates will be applied automatically and the computer will restart.
If you prefer, install WSL 2 PowerShell You can also do it via . This method offers a faster and more practical alternative, especially for users who prefer the command line.
WSL 2 Installation Steps via PowerShell:
- Open PowerShell as Administrator:
- In the search bar on the start menu, type “PowerShell" in summer.
- In the results, right-click on “Windows PowerShell” and select “Run as administrator”.
- Enable Windows Subsystem for Linux Feature:
- Paste the following command into the PowerShell window and press Enter:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- This command enables the Windows Subsystem for Linux and does not require a computer restart.
Enable Virtual Machine Platform Feature:
- Paste the following command into the same PowerShell window and press Enter:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Download and Install WSL 2 Update:
- To fully enable WSL 2, you need to download and install a special Linux kernel update package from Microsoft. This update improves the performance and compatibility of WSL 2.
- Download the Linux kernel update package required for WSL 2 from the link below: WSL 2 Linux Kernel Update Package
- You can complete the installation by running the update package you downloaded.
After your computer restarts, Linux to install distributions Microsoft StoreYou can access. Ubuntu or any other you prefer Linux You can easily download the distribution.
Download Ubuntu for WSL2 from Microsoft Store
Steps to Download Ubuntu from Microsoft Store
- Open Microsoft Store and type “UbuntuSearch by typing ”.
- Once the download is complete, you can start the initial setup process by launching the application.
Initial Setup and User Account Creation:
- UbuntuWhen you open for the first time, the system will proceed with a short installation and then prompt you to create a username and password.
- On the next screen, we can create a username and password.
Check WSL Version:
- After installation which WSL To check that you are running on this version, you can use the following command in PowerShell or Command Prompt:
wsl -l -v
- This command shows the installed Linux distributions and which version of WSL each one is running.
Updating WSL Version:
- If you have an existing Linux distribution running on WSL 1 and want to upgrade it to WSL 2, you can use the following command:
wsl --set-version <Distro> 2
To set all your distributions to run on WSL 2 by default, use the following command:
wsl --set-default-version 2
Important notes:
- When migrating to WSL 2, if Disk Encryption is enabled on the system, this may cause you to receive an error in PowerShell. You may need to disable disk encryption.
Conclusion: Installing and configuring WSL 2 can increase the productivity of developers and tech enthusiasts by making the Linux experience easy and accessible in a Windows environment. With the steps we have covered in this guide, once you have successfully installed a popular Linux distribution like Ubuntu, you can start taking full advantage of powerful Linux tools and applications on your Windows.