⬇️Installing and Running WSL 2 and Browser Apps on Windows 11▶️

 

Installing and Running WSL 2 and Browser Apps on Windows 11

⬇️Installing and Running WSL 2 and Browser Apps on Windows 11▶️

What is WSL 2?

Windows Subsystem for Linux 2 (WSL 2) allows users to run a Linux kernel directly within Windows 11. This enables the execution of Linux-based applications and tools without the need for a separate virtual machine.


Steps to Install WSL 2 on Windows 11

1. Check System Requirements:

   Ensure your system meets the prerequisites for enabling WSL 2. It requires Windows 11, and the specific build should support WSL 2.


2. Enable Virtualization and WSL:

   - Open "Settings" > "Apps" > "Programs and Features."

   - Select "Turn Windows features on or off."

   - Enable both "Virtual Machine Platform" and "Windows Subsystem for Linux."

   - Restart your computer when prompted.


3. Install a Linux Distribution:

   - Open Microsoft Store and search for Linux distributions (e.g., Ubuntu, Debian).

   - Select the desired distribution and click "Install."

   - Launch the installed distribution to set up the Linux environment.


4. Switch to WSL 2:

   - Open PowerShell as an administrator.

   - Run the command: `wsl --set-default-version 2`


5. Set Up Linux:

   - Launch the installed Linux distribution.

   - Follow the on-screen prompts to create a user account and set up your Linux environment.


Alternatively you can simply open PowerShell as Administrator and run the command: `wsl --install`. Once the task is completed reboot your PC. Then follow the on-screen prompts to create a user account and set up the default Linux environment which is Ubuntu. 


WSL Install

Ubuntu Install

WSL Update

Launch Ubuntu

About Ubuntu


Installing Firefox and Lynx browser (gui and text based Web browsers) on WSL 2

Installing Firefox:

1. Update Repositories:

   - Run `sudo apt update` to update the package repository.


2. Install Firefox:

   - Run `sudo apt install firefox` to install Firefox.


3. Launch Firefox:

   - Type `firefox` in the terminal to open the browser.


Firefox Install

Firefox Launched

Installing Lynx:

1. Update Repositories:

   - Ensure repositories are up to date by running `sudo apt update`.


2. Install Lynx:

   - Run `sudo apt install lynx` to install the Lynx browser.


3. Launch Lynx:

   - Type `lynx` in the terminal to start browsing.


Browse Lynx

Navigating Lynx

Troubleshooting Tips:

- If encountering issues with installation or launch, ensure that your Windows 11 build supports WSL 2 and is up-to-date.

- Double-check virtualization settings in the BIOS to enable if not already done.

- Verify that you've followed each step accurately to avoid errors.


Pros and cons of using Windows Subsystem for Linux (WSL):

Pros:

1. Seamless Integration: WSL allows running Linux commands and tools directly within Windows without the need for a separate virtual machine or dual-boot setup.

  

2. Developer-Friendly: Facilitates a smoother development experience by enabling access to a wide array of Linux tools, commands, and utilities on a Windows machine.

  

3. File System Compatibility: WSL provides access to both Windows and Linux file systems, allowing easy interaction between Windows and Linux files.

  

4. Improved Performance: With WSL 2, performance enhancements were introduced, offering faster file system I/O and improved compatibility with Docker containers.

  

5. Flexibility: Provides the ability to choose and install different Linux distributions from the Microsoft Store based on individual preferences.


Cons:

1. Limited GUI Support: Although GUI applications can be run with additional configurations, full-fledged support for graphical applications within WSL might require workarounds and third-party software.

  

2. Resource Consumption: Running WSL might consume considerable system resources, especially memory and CPU, impacting overall system performance.

  

3. Some Incompatibilities: Not all Linux software or functionalities work seamlessly within WSL due to differences in the underlying architecture between Windows and Linux.

  

4. Networking Limitations: Networking configurations and certain network-related tasks might not perform as expected due to the differences in networking setups between Windows and Linux.


Uninstalling a Linux distribution from WSL:

1. Open PowerShell as Administrator: Right-click on the Start menu, select "Windows PowerShell (Admin)."


2. Enter the Command: To uninstall WSL, use the following command:

   ` wsl --unregister <DistributionName> `

   Replace `<DistributionName>` with the name of the Linux distribution you want to uninstall. For instance, if it's Ubuntu, the command would be `wsl --unregister Ubuntu`.


3. Confirm Uninstallation: Press Enter. It will unregister and uninstall the specified Linux distribution from WSL.


4. Optional: Remove the Linux Distribution Files: If you want to remove the actual Linux distribution files and clean up, you can navigate to the installation directory and delete the corresponding files manually.


After executing these steps, the specified Linux distribution will be uninstalled from WSL on your Windows machine. Repeat the process for any additional Linux distributions you wish to remove.


To disable Windows Subsystem for Linux (WSL) on Windows 11, you can use the PowerShell or the Command Prompt with administrative privileges:

Using PowerShell:

1. Open PowerShell as Administrator: Right-click on the Start menu and select "Windows PowerShell (Admin)."


2. Enter the Command: Use the following command to disable WSL:

   ` dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart `

   Executing this command will disable WSL on your Windows 11 system.


3. Restart Your Computer: Although it's not explicitly required, restarting your system can ensure the changes take effect.


Using Command Prompt:

1. Open Command Prompt as Administrator: Right-click on the Start menu and select "Command Prompt (Admin)."


2. Enter the Command: Use the following command to disable WSL:

   `dism.exe /online /disable-feature /featurename:Microsoft-Windows-Subsystem-Linux /norestart `

   This command will disable WSL on your Windows 11 system.


3. Restart Your Computer: While not always necessary, consider restarting your system to ensure the changes are applied.


Executing these steps will disable WSL on your Windows 11 machine.


To uninstall WSL 2 using the GUI on Windows 11, you can follow these steps:

Open Settings.

Click on Apps.

Click on Installed apps.

Remove the Linux distros one by one.

Then, go to Settings > System > Optional features > More Windows Features and remove the "Windows Subsystem for Linux" and "Virtual Machine Platform" features.


Overall, WSL is a powerful tool for developers seeking to utilize Linux utilities within a Windows environment. However, some limitations exist, especially concerning graphical applications and resource utilization, which users should consider based on their specific use cases.


Disclaimer:

The information provided here is intended as a guide. Users should exercise caution and back up their data before making any system changes. The Distrowrite Project does not assume responsibility for any damages or issues that may arise from following these instructions.

Comments

Popular posts from this blog

Dive into the Depth of FuguIta 7.4 🤿

🦅 Garuda Linux “Spizaetus” Hyprland Edition ⌨

🫖Brew Your Gaming Experience: Coffee Linux Chronicles ☕