Reading time: 2 minutes
Hello, in today’s tutorial, I’m going to show you how to install Ubuntu (WSL2 or WSL) on Windows 10 and 11 to be able to use this distribution within Windows itself. This allows us, among other things, to use Ubuntu’s SSH, install a test environment, or install packages with apt.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2022/06/imagen-1.png?resize=276%2C225&ssl=1)
To install WSL, open PowerShell and use this command (https://docs.microsoft.com/en-us/windows/wsl/install)
wsl --install
Once installed, restart your PC.
And you will see this message upon restarting.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2022/06/image.png?resize=736%2C228&ssl=1)
Then it will ask you to enter the UNIX user data and password.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2022/06/image-1.png?resize=900%2C160&ssl=1)
Once created, we can access it using the Ubuntu console or Windows Terminal (I recommend this APP: https://apps.microsoft.com/store/detail/windows-terminal/9N0DX20HK701?hl=en-US&gl=US)
If we use Windows Terminal, we can select the Ubuntu console
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2022/06/imagen.png?resize=665%2C228&ssl=1)
Now I recommend creating a shortcut of the Ubuntu user path to share files between Ubuntu and Windows
\\wsl$\Ubuntu\home\{username}
The path is indicated above, where {username} corresponds to the username you provided in the previous step.
![](https://i0.wp.com/devcodelight.com/wp-content/uploads/2023/07/cropped-light_logo-5.png?resize=100%2C100&ssl=1)