How to Install WSL and Ubuntu (LTS) on the Windows platform

~Sandhiya.B and Ajay

This post consolidates the information needed to set up the Ubuntu terminal on a Win 11 Machine. The Ubuntu terminal is useful to programmers to access unix power tools, write shell scripts, etc.

Step: 1   Turn Windows Features On or Off

  • Go to the search bar and type “Turn Windows features on or off” and open it.

  • The check box is seen and find “Windows Subsystem for Linux” (if the check box is off, turn it on ) and also find “Virtual machine platform” (if the check box is off, turn it on ), And click the ok button.

  • It requires restarting your system to click on the “Restart now” button.

Step: 2 Wsl Installations:

Install Wsl [Windows Subsystem for Linux],

  • After installation click the “Finish” button.

Step: 3 Ubuntu Installations:

  • Open the Microsoft Store (search for “store” from the start menu)
  • Search the store for “Ubuntu” many versions are shown just install Ubuntu(recommended) or any versions that are needed for you.

  • Click the “Get” or “Install” option.
  • Once the download is completed click on the “Launch” or “Open” option.

  • Once the ubuntu app is opened its interface is seen which is shown in the below image

  • After installing enter the username and password for the ubuntu machine.
  • NOTE:

(Username should be in lowercase and the Password need not be matched with windows)

  • Once the username and password are set then ubuntu is ready to use,

Step: 4 (if needed) to run on Windows terminal

  • To run ubuntu on a windows terminal, First install the windows terminal in the Microsoft store,
  • Ignore if already installed.

  • Click the “Get” or “Install” option
  • Once the download is completed click on the “Launch” or “Open” option.

  • Once the Windows terminal app is opened its interface is like the below image,

  • And choose the ubuntu terminal and its interface looks like the below image,

  • There you go! Now it’s ready for use.

In some exceptional cases there occurs some errors:

  • The Error looks like this, the image given below

                

  • To solve this error, open file manager and go to local disk c.

Go to the user and user profile and go to App data (if not found, it is in hidden files) and go to the local folder and click on Microsoft file and go to windows apps and copy the path, which is shown below.

  • Go to the search bar and type “edit environment variables for your account” and open it, click on environment variable and double click on the path and Click on the new button paste the copied path and click ok,

  • Now the error is fixed and the windows terminal can run the ubuntu machine.