Tutorial: Setup a Development Environment on Windows (Docker, WSL2, Ubuntu, Vscode)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] hello everyone and welcome to this tutorial I'm Dr Adler for halimi and I'm working as a data scientist for the coast visualization core lab and today we're gonna try to see how to set up a developmental environment for Windows users by installing Ubuntu and Docker on WSL first of all what is WSL WSL or Windows subsystem for Linux is very powerful tool that allows us to run a Linux environment directly on your Windows machine so with WSL you can easily install and use Ubuntu and Docker to take advantage of the powerful features of both Linux and windows foreign and so in order to set up this environment I'll be using a fresh Windows installation using virtual machine as you can see here just to be in the same conditions as you of course and yes keep in mind that all the manipulation I'm gonna do are documented in this conference page that you can see here all the different Scripts are described here and I will put the link of the of this conference page in the description of the video of course okay so to get started the first thing you need to do is to install WSL this can be done in two ways either by using Microsoft store and by looking for Windows subsystem and then get it or by using the command lines in my case I prefer and do it doing it using the command lines so for that you need to open a Powershell prompt as an administrator I recommend you to use Windows terminal so for that you look for terminal then run it as administrator [Music] and then you need to run this command WSL minus minus install okay so this command will enable all the features necessary to run WSL and also at the end of the process of this command is going to install the default version of Ubuntu available in the Macross of store it's also recommended to reboot your machine after the initial installation to complete the setup so as it's gonna take some time I will speed up the video and I will see you after the reboot of course thanks [Music] [Music] [Music] thank you [Music] [Music] thank you [Music] all right so now that my WSL is installed I need to configure my default version of Ubuntu for that I just need to enter a username I'll use for example Ardell and then a password another time and that's it you are using now the terminal of the default version of Ubuntu installed by wsf but it turns out that wsr supports a variety of Linux distribution including the latest Ubuntu release you can find them by opening the Microsoft store and searching for Ubuntu so if you look or Ubuntu will find variety of different version of Ubuntu so choose the distribution you prefer and then select get for me I will take the urban 222.04 so this is gonna be downloaded and install it on your machine after clicking on get [Music] okay so once installed you can either launch the application directly from the store or search for the Ubuntu in your windows windows terminal show you and I will choose the urban 22204 I take time sometimes to hear it and I have to do the same thing add any username and the password perfect now you are using the terminal of the Ubuntu 22204 version in WSL just to check this is the internet directory we switch we will find our five systems of the Ubuntu and the if you want to find all your files from Windows you need to change the directory to MNT and then list and you can find the hard drive C and or your files this is great which is very interesting and very useful if you want to do or like execute in Python scripts from Windows into your Ubuntu another thing to do is to always install the latest updates with the following command this one you do a PT update and upgrade this is a good practice the update Ubuntu to the latest version and ensure that all the packages are up to date all right so now I wanna also show you that it is possible to install other distributions available on the Windows store directly from a command line I'll give you an example so back to your Powershell and here run this command WSL list online this is gonna give you all the distribution of Airborne in the Microsoft store and then in order to install distribution around this command WSL s minus install minus d and choose distribution in my case I will take Kali Linux okay so this command gonna start the installation and at the end it will ask you also for the username and password and that's it you are using now the terminal of the Kali Linux Distribution on WSL so now you can run both Ubuntu and Kali Linux and one last command that I want to show you in order to see all your currently installed distribution and which version of WS are using tape WSL minus l minus V so you can see that our Ubuntu and Kali are running using the version 2 of wsf all right congratulations you now have an Ubuntu terminal running on your Windows machine the next step is to install Docker desktop to do this you need to go to the dockerdoc.com and to download the desktop version for Windows and to install it as it's gonna take some time I will speed up the video see you later [Music] thank you [Music] [Music] [Music] thank you all right our Docker desktop is working now you need to check some stuff so you need to go to settings settings General and see if it's using the WSL base it and join if it's not enabled another thing to do is to go to settings settings resources WSL integration and enable all the distribution that you have restarted our case Ubuntu and Kali and this is the default version and you apply and the restart okay so in order to check if it's well integrated you can open Windows terminal and select Ubuntu for example and then run this command Locker Iran hello okay it's uh pulling the images and it's working perfect you can see that from this major message show that your installation appears to be working correctly all right so here we are at the final steps which is now to install vs code and then add all the extension like WSL and Docker to it for that you need to go to busierstudio.com to download PS code or Windows and to install it okay so now you can look for the extensions and install Docker extension and WSL extension it's already proposing to me to install Docker I will install it that will look for WS install it okay so now you have two choice either you connect to wsr remotely from the S code like this you connect to your WSL it's gonna start a new session thank you okay it's connected so I can go to my computer memory that will be into my Ubuntu which can use Docker of course perfect everything is working the other choice is to go to start a new window and then you will find your Docker extension like this so here you can find all the containers that you have run and all the image images that you have pulled in our case it's just hello world and you can start new terminal and then choose in which distribution you want to use like Ubuntu or Kali for example and that's it I hope you enjoyed watching this video and for this tutorial helpful thank you for watching again and see you next time for other tutorials bye
Info
Channel: KAUST Visualization Core Lab
Views: 10,067
Rating: undefined out of 5
Keywords:
Id: QCt8UHK5bPo
Channel Id: undefined
Length: 15min 30sec (930 seconds)
Published: Tue Mar 07 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.