WSL,VM ware,virtual box,Environment variable,virtualization


1)WSL installation and how to enable
To enable WSL 1 on Windows 11, you'll need to first enable the "Windows Subsystem for Linux" optional feature in Windows Features. Then, install a Linux distribution from the Microsoft Store and finally, if needed, specify WSL 1 as the default version.
Here's a step-by-step guide:
1. Enable Windows Subsystem for Linux in Windows Features:
Open Windows Features: Search for "Turn Windows features on or off" in the Start menu.
Check the boxes: Select "Virtual Machine Platform" and "Windows Subsystem for Linux".
Apply changes: Click "OK" and restart your computer when prompted.
2. Install a Linux Distribution:
Open the Microsoft Store: Search for and install a Linux distribution like Ubuntu.
Launch the distribution: Once installed, you can launch it from the Start menu.
3. (Optional) Specify WSL 1 as the default version (if needed):
Open a PowerShell window as an administrator: Right-click the Start button and select "Terminal (Admin)".
Run the command: Type
wsl --set-default-version 1
and press Enter.
Important Considerations:
WSL 2 is recommended:
While WSL 1 can be enabled, WSL 2 is generally recommended as it offers better performance and compatibility.
Update WSL:
After enabling WSL, you may need to update it to the latest version using the command
wsl --update
.Alternative installation:
You can also use the command
wsl --install
(with administrator privileges) to install WSL and a default Linux distribution (like Ubuntu) in a single step.
After installing WSL on Windows 11, you can run Linux distributions directly from the Windows Start menu or by using the Windows Terminal. You can also launch Linux GUI applications and integrate them into your Windows workflow.
Here's how to use WSL after installation:
Open the Linux distribution:
You can find your installed Linux distribution (like Ubuntu) in the Start menu and launch it by clicking on its icon.
First-time setup:
The first time you open a distribution, you'll be prompted to create a username and password for your Linux user account.
Accessing the terminal:
You can use the Windows Terminal to interact with your WSL distributions. Open the Terminal, select the Linux distribution from the dropdown, and start using the command line.
Running Linux GUI apps:
WSL allows you to run Linux GUI applications directly on your Windows desktop. You can find these apps in the Start menu and launch them like any other Windows application.
Integrating with Windows:
You can pin Linux apps to the taskbar and switch between Linux and Windows applications using Alt-Tab.
kind of magic i feel
2) Virtualization
Virtualization for Windows refers to the creation of virtual (rather than physical) versions of computer resources, allowing you to run multiple operating systems or environments on a single physical Windows machine. Here's a breakdown:
🔹 Definition
Virtualization on Windows means using software to simulate hardware and run multiple operating systems or isolated environments (called virtual machines or VMs) on a single computer.
🔹 Key Components in Windows Virtualization
Hypervisor: Software that creates and runs virtual machines.
Type 1 (bare-metal): Runs directly on hardware (e.g., Microsoft Hyper-V Server).
Type 2 (hosted): Runs on an OS (e.g., VirtualBox, VMware Workstation).
Hyper-V:
Microsoft's built-in virtualization platform available in Windows 10 Pro/Enterprise/Education and Windows Server editions.
Allows you to create and manage virtual machines.
🔹 Common Use Cases
Running multiple OSes (e.g., Linux on Windows).
Testing software in isolated environments.
Simulating networks for development/training.
Improved security through sandboxing.
Server consolidation in data centers.
🔹 Popular Virtualization Tools on Windows
Tool | Type | Description |
Hyper-V | Type 1 | Built-in, high-performance virtualization by Microsoft |
VirtualBox | Type 2 | Free and open-source, widely used |
VMware Workstation | Type 2 | Commercial, robust virtualization platform |
Docker for Windows | Containerization | Lightweight virtualization using containers (not full VMs) |
🔹 How to Enable Hyper-V on Windows
Go to Control Panel > Programs > Turn Windows features on or off.
Check Hyper-V.
Restart your system.
Note: Your CPU must support virtualization (Intel VT-x or AMD-V), and it must be enabled in BIOS/UEFI.
VirtualBox
VirtualBox is a free, open-source virtualization software that allows you to run multiple operating systems on a single computer, including Windows. It creates virtual machines (VMs), which are like separate, isolated computers within your existing one. You can install and run different operating systems within these VMs, without affecting your main operating system.
Key features and benefits of VirtualBox:
Multiple OSs: Run Windows, Linux, macOS, and other operating systems simultaneously on your Windows machine.
Testing and Development: Isolates environments for testing software, experimenting with different configurations, and ensuring compatibility across platforms.
Security: Virtualized environments provide added security by isolating potential threats and malware within a VM.
Cross-platform: VirtualBox runs on Windows, Linux, macOS, and Solaris.
Open Source: Oracle offers VirtualBox as a free, open-source software.
How it works:
VirtualBox creates a virtual environment within your existing operating system, allowing you to install and run guest operating systems alongside your host operating system. These virtual machines behave like separate computers, using the resources of your host machine.
Use Cases:
Software Testing:
Test software compatibility across different operating systems without having to install them on multiple physical machines.
Development:
Develop and test applications in isolated environments, preventing interference with your primary operating system.
Learning:
Learn about different operating systems without the hassle of installing them on your main machine.
Dual Booting:
Run two operating systems on the same machine without the need for physical partitioning.
VMware
In the context of Windows, VMware refers to a company that develops virtualization software, which allows users to run multiple operating systems on a single computer. VMware's software, like VMware Workstation and VMware Player, enables the creation and management of virtual machines (VMs) on Windows systems.
Here's a more detailed explanation:
Virtualization:
VMware's software creates a layer of abstraction over the physical hardware, allowing users to create virtual machines (VMs).
Virtual Machines (VMs):
Each VM behaves like a separate computer, running its own operating system (OS) and applications.
VMware Workstation:
VMware Workstation is a powerful software that allows users to create, manage, and run virtual machines on Windows, Linux, and macOS.
VMware Player:
VMware Player is a free version of VMware Workstation that enables users to run existing virtual machines.
Benefits:
VMware virtualization allows users to:
Run different operating systems simultaneously.
Test applications in a safe and controlled environment.
Isolate applications and operating systems for enhanced security.
Conserve resources by running multiple virtual machines on a single physical machine.
Imagine a person wants to get fruits and food for a meal:
case 1:
Linux: The person goes to a local farmer’s market and hand-picks fresh fruits and ingredients themselves. They have full control over what they choose, but they need to know how to navigate the market and prepare the food from scratch.
- Explanation: Linux is a full operating system where you manage everything yourself. It offers complete control and flexibility but requires more effort and knowledge to set up and use.
case 2:
WSL (Windows Subsystem for Linux): The person is at home and uses a local delivery service from the farmer’s market. They can’t go to the market themselves, but they can order specific fruits and ingredients from the market’s catalog, and the delivery service brings it to their doorstep. They still need to prepare the food, but they’re relying on the delivery system to bridge the gap between their home and the market.
- Explanation: WSL allows you to run Linux tools and environments on a Windows system without leaving Windows. It’s like accessing Linux resources (the market) through a Windows framework (the delivery service), offering a lightweight way to use Linux without a full OS setup.
case 3:
VMware/VirtualBox: The person orders a complete meal kit from an online store like BigBasket or Blue Apron. The kit arrives with pre-selected ingredients, a recipe, and a pre-set kitchen setup delivered to their home. They can customize the meal but are limited by the kit’s contents and the kitchen space provided.
- Explanation: VMware and VirtualBox create full virtual machines, like a complete kitchen (guest OS) inside your house (host OS). It’s a fully isolated environment with its own OS, but it’s resource-heavy and includes everything, even things you might not need.
case 4:
Docker: The person enters a high-tech VR game where they can instantly "spawn" just the exact fruits and food they need from a virtual pantry, without needing a full kitchen or market trip. They grab only what’s necessary for their dish, and the VR environment handles the rest efficiently.
- Explanation: Docker uses containers to package just the application and its dependencies, sharing the host OS kernel. It’s lightweight, fast, and gives you exactly what you need without the overhead of a full OS.
Subscribe to my newsletter
Read articles from Harshal Thorat directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by

Harshal Thorat
Harshal Thorat
Software Developer successfully implemented DevOps principles