How to Install WSL on Windows 10: A Step-by-Step Guide for Beginners

Installing WSL (Windows Subsystem for Linux) on Windows 10 is pretty straightforward. You enable a feature in your system settings, install your favorite Linux distribution from the Microsoft Store, and you’re all set to enjoy a Linux experience on your Windows machine. In this guide, I’ll walk you through the steps to achieve this seamlessly.

How to Install WSL on Windows 10

Getting WSL on your Windows 10 machine will allow you to run a Linux environment directly on Windows, without the need for a virtual machine or dual-boot setup. Here’s how you can do it:

Step 1: Open PowerShell as Administrator

First, you need to access PowerShell with administrative privileges.

To do this, simply right-click on the Start button and select "Windows PowerShell (Admin)." This will open a terminal window where you can enter commands with elevated permissions.

Step 2: Enable WSL Feature

Next, you need to enable the WSL feature using a PowerShell command.

Type dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart and hit Enter. This command instructs Windows to install the necessary components for WSL.

Step 3: Restart Your Computer

After enabling WSL, you’ll need to restart your computer.

A restart is necessary because it allows the newly enabled feature to fully integrate with your system. Make sure to save any work before you reboot.

Step 4: Install Your Preferred Linux Distribution

Once your computer restarts, head over to the Microsoft Store and choose a Linux distribution.

In the store, search for "Linux" and you’ll see options like Ubuntu, Debian, or Kali Linux. Click on your preferred distribution and hit install.

Step 5: Launch Your Installed Linux Distribution

After installation, launch your Linux distribution from the Start menu.

The first time you run it, it will take a few moments to set up. You’ll be prompted to create a username and password for your Linux environment.

Step 6: Update and Upgrade Your Linux Distribution

Finally, make sure your Linux system is up-to-date.

Open your Linux terminal and enter sudo apt update && sudo apt upgrade. This command updates the package listings and installs any available upgrades.

Once you’ve completed these steps, you’ll have a fully functional Linux environment running on your Windows 10 machine. You can now use Linux commands, run scripts, and even develop software as if you were on a native Linux system.

Tips for Installing WSL on Windows 10

  • Ensure Windows 10 Version: Make sure your Windows 10 is updated to build 16215 or later, as WSL is not available in earlier versions.
  • Choose the Right Distribution: Consider what you need a Linux environment for and choose your distribution accordingly. Ubuntu is user-friendly, while Kali Linux is great for security testing.
  • Use WSL 2: Windows Subsystem for Linux 2 offers improved performance and complete system call compatibility. You can upgrade by entering wsl --set-default-version 2 in PowerShell.
  • Check System Requirements: Ensure your system supports WSL by visiting Microsoft’s official documentation if you run into issues.
  • Install Additional Tools: Enhance your experience by installing tools like git, vim, or zsh, which can make development more efficient.

Frequently Asked Questions

What is WSL?

WSL stands for Windows Subsystem for Linux, a compatibility layer for running Linux binary executables natively on Windows.

Is WSL free to use?

Yes, WSL is completely free, and you can download various Linux distributions from the Microsoft Store at no cost.

Can I run graphical applications on WSL?

With WSL 2, it is possible to run graphical Linux applications using an X server on Windows.

How do I switch between WSL 1 and WSL 2?

You can switch by using the command wsl --set-version. This allows switching between versions 1 and 2.

Are there any security concerns with WSL?

WSL is generally secure, but like any software, it can have vulnerabilities. Always keep your system and software up to date.

Summary

  1. Open PowerShell as Administrator.
  2. Enable WSL feature.
  3. Restart your computer.
  4. Install your preferred Linux distribution from the Microsoft Store.
  5. Launch the installed Linux distribution.
  6. Update and upgrade your Linux distribution.

Conclusion

Installing WSL on Windows 10 is a gateway to combining the best of both worlds: the versatility of Linux and the familiarity of Windows. Whether you’re a developer looking for a richer command-line interface or someone who wants to learn Linux without leaving their Windows environment, WSL makes it possible. With just a few steps, you can easily set up a functional Linux environment right on your Windows 10 PC.

Remember, the goal is to make your computing life easier, and WSL is a great tool for that. If you run into issues, there’s a wealth of information available online and in communities dedicated to WSL. So go ahead, give it a try, and enjoy the power of Linux on your Windows machine!

Get Our Free Newsletter

How-to guides and tech deals

You may opt out at any time.
Read our Privacy Policy