Windows Subsystem for Linux (WSL) is an amazing feature provided by Microsoft that allows developers to run Linux distributions alongside their Windows installation. Windows 11 brings an improved version of WSL with some exciting additions. In this blog post, we’ll guide you through the process of installing and using WSL on Windows 11.
Before you begin, make sure your system meets the following requirements:
- Your computer must be running Windows 11.
- Ensure that you have administrator privileges on your computer.
- Virtualization should be enabled in your computer’s BIOS settings.
Step 1: Install WSL
Follow these steps to install WSL on your Windows 11 computer:
- Open Windows Terminal as an administrator. You can do this by right-clicking the Windows Terminal icon and selecting “Run as administrator” from the context menu.
- Run the following command to enable the WSL feature:
This command will download and install the necessary components, including the virtual machine platform and the Linux kernel. Once the installation is complete, you’ll be prompted to restart your system.
Step 2: Choose a Linux Distribution
Once your system has restarted, you’ll need to choose a Linux distribution from the Microsoft Store. A few popular options include Ubuntu, Debian, and Kali Linux. For this guide, we’ll use Ubuntu.
- Open the Microsoft Store and search for “Ubuntu.”
- Select the Ubuntu distribution you prefer (e.g., Ubuntu 20.04 LTS) and click on the “Get” or “Install” button.
- Once the installation is complete, launch the Ubuntu app from the Start menu.
Upon launching the app, you’ll see a terminal window open. The system will take a few minutes to set up the Ubuntu distribution for the first time. You’ll then be prompted to create a username and password for your new Linux environment.
Step 3: Using WSL
Now that you have WSL and a Linux distribution installed, you can start using your new Linux environment. Here are a few basic commands to help you get started:
- Launching a Linux terminal: Open Windows Terminal and choose your installed Linux distribution from the dropdown menu. Alternatively, you can simply open the installed Ubuntu app.
- List files and directories: Use the ls command to list files and directories in the current directory.
- Navigate directories: Use the cd command to change the current directory. For example, cd /home will navigate to the /home directory.
- Create files: Use the touch command to create an empty file. For example, touch myfile.txt will create a new file called myfile.txt.
- Create directories: Use the mkdir command to create a new directory. For example, mkdir my_directory will create a new directory called my_directory.
That’s it! You’ve now installed WSL on Windows 11 and are ready to explore the world of Linux alongside your Windows environment. Not only does WSL provide a powerful environment for developers, but it also makes it easy for users to access a wide range of Linux tools and applications. Enjoy your new Linux experience on Windows 11!