Linux on Windows......Windows on Linux
Based on NetworkChuck's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Enable virtualization in BIOS/UEFI (Intel VTX or AMD-V) because WSL 2 runs lightweight virtual machines.
Briefing
WSL 2 turns a Windows PC into a multi-distro Linux workstation—running Ubuntu and Kali Linux side by side—while letting Linux and Windows commands, files, GUI apps, Docker containers, and even GPU access work together. The practical payoff is speed and convenience: install Linux once, then use Linux tooling (including security and networking utilities) without leaving Windows, and still reach Windows drives and apps from the Linux environment.
Getting there starts with requirements. WSL 2 needs a 64-bit processor (x86_64) and supports ARM, with at least 4GB of RAM recommended and 16GB suggested for a smoother experience. Virtualization must be enabled in BIOS/UEFI—Intel systems look for Intel VTX, while AMD systems look for AMD-V—because WSL 2 relies on lightweight virtual machines.
On the Windows side, Windows 11 is positioned as the best match, while Windows 10 remains supported only if it’s on build 19041 or higher. After confirming the Windows version, the install itself is straightforward: open Windows Terminal with admin privileges and run the single command `wsl --install`. That command enables the necessary platform service, installs the default Linux distribution (Ubuntu in this walkthrough), and then prompts a reboot. After restart, Linux asks for a username and password, and the user can enter and exit the environment using the terminal or `wsl -d <distro>`.
Adding more distros is done two ways: from the command line with `wsl --list --online` and `wsl --install <distro>`, or through the Microsoft Store for a smoother experience—especially for Kali Linux. Once both Ubuntu and Kali are running, Kali starts minimal, but `cali-tweaks` can install a curated set of tools (the transcript highlights “top 10 tools”).
A key theme is interoperability. From Linux, Windows commands can be invoked—`ipconfig` runs inside Linux, Windows Notepad can open files via an `.exe` call, and Windows Explorer can be launched with `explorer.exe .` to browse the current Linux directory. The reverse works too: in PowerShell, Windows `ipconfig` output can be piped into Linux commands like `grep` (invoked as `wsl grep ...`), and Linux file tools like `cat` can read files from the Windows side.
The walkthrough also demonstrates real tooling. SpiderFoot, an open-source OSINT tool, is installed and run inside WSL, then served via a local web server on port 5001 and accessed at `localhost:5001`. A scan against a named target returns personal data, underscoring how easily public and brokered information can be aggregated.
Beyond the command line, WSL 2 supports GUI apps through WSLG: installing and launching Wireshark from Ubuntu opens a graphical interface inside Windows. Kali also uses a Windows integration tool (Winex) to run full GUI apps. For development, VS Code connects to WSL directly via the WSL extension, and Docker can run containers inside WSL—either by installing Docker Engine from the terminal or using Docker Desktop configured to use WSL 2.
Finally, the transcript goes deeper into management and configuration. WSL commands can list distros, shut down all instances (`wsl --shutdown`), terminate a specific distro (`wsl --terminate <distro>`), set a default distro, and unregister (remove) a distro. It also shows how to access Windows drives from Linux (`/mnt/c/...`) and how to mirror networking mode by editing WSL config files—switching from NAT to mirrored mode and noting an “eight second rule” for changes to take effect. For portability, WSL instances can be backed up with `wsl --export` to a tar file and restored on another machine with `wsl --import`, including specifying the user on first connection.
Cornell Notes
WSL 2 lets Windows run real Linux environments (Ubuntu, Kali Linux, openSUSE Tumbleweed, and more) with tight integration: Linux and Windows commands can call each other, Linux can access Windows drives under `/mnt`, and Windows can browse Linux files via Explorer. WSLG enables Linux GUI apps (like Wireshark) to open as Windows-style windows, while VS Code can attach directly to WSL for a seamless dev workflow. Docker Desktop can use WSL 2 for container management, and GPU access is available from Linux via NVIDIA tooling (e.g., `nvidia-smi`). The setup hinges on enabling virtualization in BIOS and using Windows 11 (or Windows 10 build 19041+).
What prerequisites make WSL 2 work smoothly on a Windows machine?
How does someone install WSL 2 and enter Linux from Windows?
What are the two main ways to add additional Linux distributions like Kali Linux?
How do Linux and Windows interoperate for commands and files?
What does WSLG add, and how does it change app usage?
How can WSL instances be managed, configured, and backed up?
Review Questions
- What BIOS/UEFI settings must be enabled for WSL 2, and why are they necessary?
- Describe two concrete examples of Linux-to-Windows and Windows-to-Linux command interoperability mentioned in the walkthrough.
- How would you back up an Ubuntu WSL instance and restore it on another machine using the export/import workflow?
Key Points
- 1
Enable virtualization in BIOS/UEFI (Intel VTX or AMD-V) because WSL 2 runs lightweight virtual machines.
- 2
Use Windows 11 for the smoothest experience; Windows 10 requires build 19041 or higher.
- 3
Install WSL 2 quickly with `wsl --install`, then enter Linux via the default distro or `wsl -d <distro>`.
- 4
Add distros either via `wsl --list --online` + `wsl --install <distro>` or through the Microsoft Store for a simpler Kali Linux setup.
- 5
Use WSLG to run Linux GUI apps on the Windows desktop, and use VS Code’s WSL extension to attach directly to WSL files and terminals.
- 6
Leverage interoperability: call Windows `.exe` from Linux (e.g., `ipconfig`, `notepad.exe`, `explorer.exe`) and invoke Linux tools from PowerShell using `wsl` in pipelines.
- 7
Manage and protect your environments with WSL commands (shutdown/terminate/unregister) and backups using `wsl --export` and `wsl --import` tar files.