WSL Lecture Presentation
WSL Lecture Presentation
(WSL)
Comprehensive Guide for Computer
Science Students
Introduction to WSL
• • Windows Subsystem for Linux (WSL) allows
users to run a Linux environment directly on
Windows, without needing a virtual machine.
• • WSL provides the ability to use Linux
command-line tools, utilities, and applications.
• • WSL is useful for developers, system
administrators, and anyone looking to work in
a Linux-based environment within Windows.
Uses and Benefits of WSL
• • Access Linux command-line tools directly in
Windows.
• • Ideal for development in languages like Python,
Ruby, and Node.js.
• • Provides a seamless workflow for cross-platform
development.
• • Reduced resource usage compared to full virtual
machines.
• • Integration with Windows tools and applications.
Installation Procedure for WSL
• 1. Open PowerShell as Administrator.
• 2. Enable WSL by typing:
• - `wsl --install` (installs default Ubuntu
distribution)
• 3. Restart the computer if prompted.
• 4. Open WSL by typing `wsl` in the Windows
search bar.
• 5. Set up your Linux environment and start
using Linux commands!
Enabling Virtualization in BIOS
• • Restart the computer and enter BIOS/UEFI
settings (often by pressing F2, F10, or Delete).
• • Look for options like 'Virtualization
Technology' or 'Intel VT-x'.
• • Enable these settings to allow WSL to
operate properly.
• • Save and exit BIOS settings, then restart your
computer.
Common Issues and
Troubleshooting
• • Issue: 'WSL 2 requires an update to its kernel
component.'
• - Solution: Download and install the latest WSL 2
kernel update package.
• • Issue: 'Virtualization is disabled.'
• - Solution: Enable virtualization in BIOS as shown
earlier.
• • Issue: Installation errors or slow performance.
• - Solution: Check for Windows updates or reinstall
WSL components.
Conclusion and Q&A
• • WSL bridges the gap between Windows and
Linux, providing a flexible development
environment.
• • Ideal for developers looking for Linux tools
within Windows.
• • Thank you! Questions?
How to Install and use C++
• sudo apt update
• sudo apt install g++ -y
• nano hello.cpp
– This opens a simple editor where you can write
your code. After typing the code, press ctrl+o to
save and ctrl+x exit.
• g++ hello.cpp hello
• ./hello