Installing the Power of Linux on Windows: Enabling WSL

Ever wished you could run Linux commands directly on your Windows machine? Well, with Windows Subsystem for Linux (WSL), that wish becomes reality! WSL lets you seamlessly integrate a Linux environment within Windows, allowing you to leverage the power of both operating systems.

Today’s post will guide you through enabling WSL on your Windows system, opening doors to a world of Linux possibilities.

Two Methods for WSL Activation

There are two primary ways to enable WSL: using the Windows Features interface or through the command line. Both methods achieve the same outcome, so pick the one that suits your comfort level.

Method 1: Activating WSL via Windows Features

  1. Search and Locate: Head over to the Start menu and search for “Turn Windows features on or off.” This will bring up the Control Panel applet.
  2. Enable the Feature: Within the list of features, scroll down until you find “Windows Subsystem for Linux.” Check the box next to it and click “OK.”
  3. Restart and Rejoice: You’ll be prompted to restart your computer to apply the changes. Click “Restart Now” and get ready to dive into WSL!

Method 2: Command Line Activation with PowerShell/Command Prompt

  1. Admin Access is Key: Right-click on the Start menu icon and select either “PowerShell (Admin)” or “Command Prompt (Admin)” to open the terminal with administrator privileges.
  2. Enable with a Command: Within the terminal window, type the following command and press Enter:

wsl –install

This command enables WSL and installs the default Ubuntu distribution. After running the command, you’ll need to restart your computer for the changes to take effect.

Additional Tidbits: Exploring Distributions and Customization

  • By default, both methods install Ubuntu. However, the world of WSL offers various Linux distributions through the Microsoft Store.
  • To see available distributions, use the following command (you can copy and paste it into your terminal):

wsl --list --online

or

wsl -l -o

  • Want to install a specific distribution during the initial setup? No problem! Use the following command with the -d flag followed by your desired distribution’s name:

wsl --install -d <Distribution Name>

Replace <Distribution Name> with the actual name of the distribution you want (e.g., Debian, Kali Linux).

Now that WSL is up and running, you’re ready to explore the vast potential of Linux commands and tools directly on your Windows machine. With this newfound power, you can manage files, run scripts, develop applications, and delve into the world of open-source software – all within the familiar environment of Windows.

Tip: Try to integrate WSL with the Remote-SSH on VS-Code

For further exploration, check out the official Microsoft documentation on WSL installation for a deeper dive: https://learn.microsoft.com/en-us/windows/wsl/install. Happy WSLing!

Leave a Comment

Leave a Reply

Your email address will not be published. Required fields are marked *