Monday, September 9, 2024

Install Ubuntu on Windows Subsystem for Linux (WSL) with Ease

 

Running Ubuntu on Windows has never been easier, thanks to the Windows Subsystem for Linux (WSL). In this guide, I’ll show you how to install Ubuntu on WSL through the Microsoft Store.

Install Ubuntu on Windows Windows Subsystem for Linux (WSL) Ubuntu on WSL WSL 2 installation guide Linux on Windows 10/11 Ubuntu via Microsoft Store WSL vs Virtual Machine Enable WSL on Windows Install Linux on Windows WSL 2 setup tutorial Ubuntu for developers on Windows Microsoft Store Ubuntu installation WSL 2 vs WSL 1 Dual boot alternative for Linux Ubuntu terminal on Windows

What is WSL?

WSL is a compatibility layer developed by Microsoft, enabling users to run native Linux binaries directly on Windows. WSL 2, the latest version, offers a full Linux kernel and provides greater performance compared to its predecessor. With WSL, you can enjoy the best of both worlds — Linux tools alongside your Windows workflow.

Step 1: Enable Windows Subsystem for Linux

Before installing Ubuntu, you’ll need to enable WSL on your Windows machine. Here’s how:

  1. Open PowerShell as Administrator:
  • Press Windows Key + X and select Windows PowerShell (Admin) from the menu.

2. Enable WSL:

  • In the PowerShell window, run the following command:
wsl --install

This command automatically enables both WSL and Virtual Machine Platform, which is required for WSL 2.

3. Restart Your PC:

  • After running the command, restart your system to apply the changes.

Step 2: Install Ubuntu from Microsoft Store

Now that WSL is enabled, it’s time to install Ubuntu.

  1. Open Microsoft Store:
  • Press the Windows Key and type Microsoft Store in the search bar. Open the Store from the results.

2. Search for Ubuntu:

  • In the Microsoft Store, search for Ubuntu. You’ll find several versions like Ubuntu 20.04 LTS, Ubuntu 22.04 LTS, and more. Choose the version you’d like to install and click Get.

3. Install Ubuntu:

  • Once you’ve selected your preferred version, click the Install button. The installation process will begin and might take a few minutes, depending on your internet speed.

Step 3: Set Up Ubuntu

After installation, you can launch Ubuntu and configure it.

  1. Open Ubuntu:
  • Once Ubuntu is installed, you’ll find it in your Start Menu. Click on Ubuntu to open the terminal.

2. Create a User Account:

  • The first time you run Ubuntu, you’ll be prompted to create a username and password. This will serve as your default user for future logins.

3. Update Your System:

  • After setting up your user, update your Ubuntu installation by running the following commands:
sudo apt update
sudo apt upgrade

Step 4: Switching Between WSL 1 and WSL 2

By default, WSL installs version 2, but you can switch between WSL 1 and WSL 2 as needed.

  1. Check WSL Version:
  • To check which version of WSL you’re running, use the command:
wsl -l -v

2. Set Default WSL Version:

  • If you want to switch to WSL 1 or WSL 2, you can set your default version by running:
wsl --set-version Ubuntu-20.04 2

Replace Ubuntu-20.04 with your installed version, and 2 with either 1 or 2 depending on your preference.

Step 5: Enjoy the Power of Linux on Windows

You’ve successfully installed Ubuntu on WSL! Now, you can run Linux commands, use development tools like Git, Docker, and Python, or experiment with bash scripts — all from your Windows machine.

Some key benefits of WSL include:

  • No need for dual-booting or virtual machines.
  • Seamless integration with Windows — access Windows files from Linux and vice versa.
  • Lightweight and fast, especially with WSL 2’s full Linux kernel.

Explore more detailed content and step-by-step guides on our YouTube channel:-

Conclusion

Installing Ubuntu on Windows Subsystem for Linux via the Microsoft Store is simple and efficient. Whether you’re a developer looking to test code in a Linux environment or a curious user eager to explore Ubuntu’s capabilities, WSL makes it incredibly easy to get started.

Connect with Me:

No comments:

Post a Comment

Ethical Hacking Techniques: Cracking WPA/WPA2 Wi-Fi Using WPS and Capturing Handshakes

In the realm of cyber security, ethical hacking plays a crucial role in identifying and addressing vulnerabilities. One of the areas where e...