DEV Community

Sohaib Ilyas
Sohaib Ilyas

Posted on • Originally published at sohaibilyas.com

Unlocking Linux on Windows: A Guide to Installing Ubuntu Using WSL 2 on Windows 11

Have you ever wondered how WSL 2 (Windows Subsystem for Linux) lets developers use a Linux-like environment right on Windows? It's quite intriguing! It provides a simple way to set up Laravel, PHP, Python, Node.js, Vue.js, React.js, and many more for development. Let's explore how to get started quickly.

Step 1: Enable Virtualization in BIOS

  1. Restart your computer and enter the BIOS/UEFI settings (usually by pressing F2, Delete, or Esc during boot).
  2. Look for an option like Intel Virtualization Technology, AMD-V, or SVM Mode under the processor or advanced settings.
  3. Enable the option and save changes.
  4. Restart your system.
  5. Check if it enabled using Windows Task Manager Ctrl + Shift + Esc

Check CPU virtualization in Windows Task Manager

Step 2: Install WSL 2 and Ubuntu on Windows 11

First, we need to check if Windows Subsystem for Linux is enabled as a feature on Windows or not, so press Start key on your keyboard to bring start menu on front and type windows features and open the program.

Install WSL 2 and Ubuntu on Windows 11

Now enable Windows Subsystem for Linux and Virtual Machine Platform and restart your machine.

Enable Windows Subsystem for Linux and Virtual Machine Platform

Open Windows Powershell as Administrator and run the following command to install WSL 2 and Ubuntu Linux OS on Windows.

wsl --install
Enter fullscreen mode Exit fullscreen mode

If you're still having trouble installing WSL 2 on your Windows computer, feel free to comment below. I'm here to help!

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Dive into an ocean of knowledge with this thought-provoking post, revered deeply within the supportive DEV Community. Developers of all levels are welcome to join and enhance our collective intelligence.

Saying a simple "thank you" can brighten someone's day. Share your gratitude in the comments below!

On DEV, sharing ideas eases our path and fortifies our community connections. Found this helpful? Sending a quick thanks to the author can be profoundly valued.

Okay