WSL2, or Windows Subsystem for Linux 2, is a powerful tool that allows users to run a Linux environment directly on the Windows operating system. Ubuntu is one of the most popular Linux distributions available and is a great choice for developers to boost productivity. In this article, we will guide you through the process of setting up an Ubuntu instance on Windows with WSL2 from the Windows Store and boost your productivity in development.
To be able to install Ubuntu on your Windows machine, it is necessary to enable WSL2. To do this, follow these steps:
- Open the Start menu and search for “Windows Features.”
- Select “Turn Windows Features on or off.”
- Scroll down to “Windows Subsystem for Linux” and check the box.
- Click “OK” and wait for the feature to be installed.
Install Ubuntu from the Microsoft Store
The Microsoft Store has a variety of Linux distributions available for download, including Ubuntu. To install Ubuntu, follow these steps:
- Open the Microsoft Store app on your Windows machine.
- Search for “Ubuntu” in the search bar.
- Select “Ubuntu” from the search results.
- Click “Get” to download and install Ubuntu.
The installation process may take a few minutes, depending on your internet connection speed.
Launch Ubuntu and set up a new user account
Once Ubuntu is installed, you can launch it by clicking the “Launch” button in the Microsoft Store or by searching for “Ubuntu” in the Start menu. When you first launch Ubuntu, you will be prompted to create a new user account. Follow the on-screen instructions to set up a username and password.
Update and upgrade Ubuntu
After you have set up your new user account, it’s a good idea to update and upgrade Ubuntu to ensure that you have the latest security patches and software updates. To do this, open the terminal in Ubuntu by clicking the Ubuntu icon in the taskbar and typing “terminal” into the search bar. Run below commands to update and upgrade:
sudo apt-get update
sudo apt-get upgrade
You should see some output like the screenshot shared below.
Use Ubuntu on WSL2
Congratulations! You have set up Ubuntu on WSL2. Use it just like you would any other Linux distribution. You can install and use software, run commands in the terminal, and even access the Linux file system directly from Windows.
Setting up Ubuntu on WSL2 from the Windows Store is a straightforward process that allows you to run a Linux environment directly on your Windows machine. With Ubuntu, you have access to a powerful and user-friendly Linux distribution that can help you complete a wide range of tasks, from web development to data analysis. The article covered how to setup Ubuntu instance on Windows using WSL2 to boost your productivity.