syselement's Blog
TwitterGitHubBuy Me a BookContact
  • â„šī¸Home
  • đŸ”ŗOperating Systems
    • 🐧Linux
      • 📃Everything Linux
      • Linux Distros
        • Kali Linux - VM
        • ParrotOS - VM
        • Rocky Linux
        • Ubuntu Desktop - VM
        • Ubuntu Server - VM
      • Linux Tools
        • BookStack
        • Nessus Essentials
        • SysReptor
        • Terminator
        • UniFi
        • Zsh & Oh-My-Zsh
    • đŸĒŸWindows
      • 📃Everything Windows
      • Windows Tools
        • Hashcat
        • Vagrant
      • Windows Virtual Machines
        • Windows 11 - VM
        • Windows Server 2025 - VM
  • 📝Courses Notes
    • eLearnSecurity / INE
      • eJPT - PTSv2
      • eMAPT
      • ICCA
    • Practical Networking
      • Practical TLS
        • TLS/SSL Overview
        • Cryptography
        • x509 Certificates and Keys
        • Security through Certificates
        • Cipher Suites
        • TLS/SSL Handshake
        • TLS Defenses
        • TLS Attacks & Vulnerabilities
        • What's new in TLS 1.3?
        • TLS 1.3 Under the Hood
        • TLS 1.3 Extensions
        • 🌐Practical TLS References
    • TCM Security
      • Linux101
      • MAPT
      • PEH
  • đŸ–Ĩī¸Cyber Everything
    • 📌Generic Resources
      • Cryptography
      • CVSS 3.1
      • Cyber Threat Intelligence (CTI)
    • 📱Mobile
      • Apps Lab
        • Android Rooting Guide
        • iOS Jailbreak Guide
        • Intercepting Android App Traffic
      • OWASP MAS
        • MASTG Techniques
        • MASTG Tests
        • MASTG Theory
        • MASVS Notes
      • Tools
        • MobSF
    • đŸ§ŦNetwork
    • 🌐Web
      • API
        • API Sec Fundamentals
        • API Penetration Testing
      • PortSwigger Academy
        • Server-Side Topics
        • Client-Side Topics
        • Advanced topics
        • đŸ”ŦVulnerability Labs
    • âœī¸Writeups & Walkthroughs
      • đŸŒŠī¸TryHackMe
        • 📖Learn
          • Cyber Threat Intelligence
          • Intro to Defensive Security
          • Juice Shop
          • Upload Vulnerabilities
        • đŸŽ¯Practice
          • Easy
            • Blaster
            • Blue
            • Bolt
            • Chill Hack
            • Ice
            • Ignite
            • Retro
            • Startup
          • Medium
            • Blog
      • đŸ“ĻHackTheBox
      • 🚩Capture The Flag
  • â™žī¸DevOps Everything
    • 🔗DevOps Resources
      • Introduction to DevOps
      • Ansible
      • Docker
      • Git
      • Kubernetes
      • Terraform
      • Vim
  • đŸ”ŦHome Lab
    • đŸ–Ĩī¸Hypervisors
      • Hyper-V
        • Windows WSL
      • Proxmox
        • Proxmox VE
        • Proxmox Upgrade 7 to 8
      • VMware
        • VMware Workstation Pro
    • 🔴Offensive Labs
      • Hashcat Password Cracking
      • Metasploitable3
    • đŸ”ĩDefensive Labs
      • Detection Lab
    • âšĒMisc Labs
      • Bitwarden On-Premise
      • OpenWrt & WiFi Exploitation
      • Passbolt CE - Ubuntu Server
Powered by GitBook
On this page
  • 🌐 Resources 🔗
  • Install WSL
  • Ubuntu WSL - Ansible control node

Was this helpful?

Edit on GitHub
  1. Home Lab
  2. Hypervisors
  3. Hyper-V

Windows WSL

PreviousHyper-VNextProxmox

Last updated 3 months ago

Was this helpful?

WSL (Windows Subsystem for Linux) is a compatibility layer that lets you run Linux distributions directly on Windows, providing a seamless command-line experience without the need for a separate virtual machine. WSL 2 takes this further by employing a lightweight virtual machine managed by the Hyper-V hypervisor, offering a full Linux kernel with improved performance and system call compatibility.


🌐 Resources 🔗


Install WSL

Open Powershell as admin and run the following command that will enable the features necessary to run WSL (VirtualMachinePlatform) and install the Ubuntu distribution of Linux.

# if necessary
# Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
# Enable-WindowsOptionalFeature -Online -FeatureName VirtualMachinePlatform -NoRestart
wsl -install
# Installs wsl and Ubuntu distro by default
wsl --set-default-version 2
# WSL commands
wsl --list --verbose
wsl --list --online
wsl --update
  • Restart the Windows host

  • After the restart, open Terminal app and select Ubuntu

    • Configure username and password when prompted


Ubuntu WSL - Ansible control node

  • Open the Ubuntu WSL terminal and proceed with the necessary packages installation

sudo sed -i.bak 's/%sudo\s\+ALL=(ALL:ALL) ALL/%sudo ALL=(ALL:ALL) NOPASSWD: ALL/' /etc/sudoers

sudo apt update -y && sudo apt full-upgrade -y && sudo apt autoremove -y

sudo apt install -y software-properties-common

sudo add-apt-repository --yes --update ppa:ansible/ansible
sudo apt install -y ansible python3-pip 

pip install ansible-dev-tools --break-system-packages

# Close and reopen the Ubuntu WSL terminal
ansible --version
ansible-lint --version

WSL will automatically download and install the latest stable LTS release of Ubuntu by default. When new LTS versions are released, Ubuntu can be upgraded once the first point release is available ()

Update OS, install , pip (Python package manager) and ansible-lint in the Ubuntu WSL distro.

Install with Ansible and .

đŸ”Ŧ
đŸ–Ĩī¸
What is Windows Subsystem for Linux | Microsoft Learn
Develop with Ubuntu on WSL - Ubuntu on WSL documentation
Work in Windows Subsystem for Linux with Visual Studio Code
docs
Ansible
VS Code
WSL extensions
microsoft.com
Ubuntu on WSL