How to Install WSL2 & Ubuntu Linux GUI (XFCE Desktop) on Windows 10

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey savvy people it's savvy nick here and today we'll be installing the windows subsystem for linux on windows 10. if you're new in stopping by to watch a video today please make sure to subscribe below and hit that notification bell for more programming in linux videos let's get right into it windows subsystem for linux is also known as wsl and today we'll be installing wsl to the second update to wsl we'll also be using ubuntu today and that will be the 20.04 version so let's get started first we're going to go to the start menu and start searching for features if you just type in features you'll be able to find something that says turn windows features on or off go ahead and click on that and you'll get this screen here that allows you to go ahead and select various different features and what we're looking for in here is at the very bottom you'll find the windows subsystem for linux let's go ahead and check this box and hit ok windows will begin searching for the required files to install the system and it should be fairly quick but will require you to go ahead and restart your computer but we're going to go ahead and wait on this because we want wsl 2 so we need one more feature installed i'm going to hit don't restart and wait a second and now i'm going to go ahead and just check my version of windows to make sure that wsl2 is available so we can do that also by hitting the start menu and let's go ahead and search for win ver and that's a command that you can run and you see right here it says run command we'll click on that and what you'll get is a window here that tells you the current version and build so what you're looking for is something over version 2004 and build number 19041 or higher so currently this windows platform does not support wsl2 but let's go ahead and search for an update if we go back to search and we type in update let's go ahead and check for updates here's the window that we expect to see and we can see here that we have a feature update that updates this windows 10 to version 2004 which is the one that we need so i'm going to go ahead and download in install now and now this will take a few minutes to go ahead and download after the download you'll be required to go ahead and install the update as well as restart your computer [Applause] [Music] [Applause] [Music] all right and once your windows update is complete you can go ahead and hit the restart now button alright and now that we have our update installed and ready for windows we'll go ahead and launch the search bar and find features again and you'll get this window once more and then we'll scroll to the bottom at the bottom we'll find a virtual machine platform and that's what we'll need in order to go ahead and run wsl2 on this machine so let's go ahead and select that and hit ok give it a few moments here while it searches and applies the changes and now it says your windows pc needs a reboot once more so we'll go ahead and restart it now all right and after the install we're ready to go ahead and set wsl2 as our default version what we'll need is to launch a powershell for this so we'll hit the start menu and search for powershell and go ahead and run this one as administrator so you can hit the run as administrator button that'll ask you if you want to go ahead and run the application as an administrator we'll hit yes and you'll get a window similar to this if you did everything correctly and in here we want to type wsl space dash dash set dash default dash version all together and then two so the only two spaces i have here are here and here so after we've typed this command in let's go ahead and press enter alright and now it's warning us of something it says wsl2 requires an update to its kernel component so let's go ahead and update that kernel component by going to this webpage and if we go to that web page we can go ahead and see that we can download the linux kernel update package here so let's go ahead and do this by clicking the download latest wsl2 kernel now if we do that you'll see that something has launched at the bottom wsl update x64 for a 64-bit architecture since i have a 64-bit computer i'm going to go ahead and launch this and now we'll install the linux kernel for the windows subsystem for linux let's hit next and allow it to have administrative privileges finish this up real quick and it was as easy as that so we'll rerun that command that we just did you could either hit the up arrow or type in again wsl space dash dash set dash default dash version space 2. i'll go ahead and put that in the description below if you need it press enter and now we get for information on key differences with wsl2 please visit this website so you can see the differences but we don't need to do that we've successfully enabled the wsl2 as our default version of swl all right and now it's our turn to go ahead and install a linux distribution of our choice and run it through wsl on windows so let's go ahead and exit out of here the way we can do this are really two ways but here's a pretty good link that has all the different versions of linux currently available some do cost a little bit in order to go ahead and install but we're going with the ubuntu 20.04 lts version today which is free so if we just click on that that'll take us to another link and we'll hit get and it says now that we can open up the microsoft store from here so i'm just going to do that you can also just search for ubuntu inside the microsoft store if you want and not have to go through this website but i'll go ahead and put a link in the description below in order to do the same thing i did alright go ahead and hit get and then you'll see this screen here and if you went ahead and made it this far please hit the like button it helps support the channel as well as bring new members to the channel let's select the install button now which will begin downloading ubuntu 20.04 lts and then install it this of course is for wsl2 and once everything's ready you'll get the launch button that's available and you can hit launch now we get a new terminal here that tells us installing this may take a few minutes so after this is processed we'll be able to set up our new user for the ubuntu system so as it asks here let's go ahead and put in our new username the user i'll be using is savvy nick and then i'm going to put a password in for savvy nick just make sure you remember the password because you'll have to use it in order to log in go ahead type that password in it's not going to show up here because it's hidden so other people can't see it but know that while you're typing it is taking the characters so retype that password once more and as long as things match and you press enter you'll be entered into your new system congratulations if you made it this far you've successfully installed ubuntu 20.04 on the windows subsystem for linux version 2 but we'll want to take this one step further and go ahead and install a graphical user interface also known as a desktop environment here in ubuntu so we can use it instead of just using the command line interface that's currently in front of us if this is enough for you this is a good stopping point otherwise we'll go ahead and continue alright in order to go ahead and use a desktop environment inside of windows with our ubuntu install we'll need something called vcx srv which is short for vcx server this will help us render and use the desktop environment on ubuntu once we install it so i'll go ahead and put a link in the description below in order to go ahead and download the vcx server windows x server you can also find it by googling vc x serve and the first link will be the sourceforge.net download for it otherwise you can go to the github page for it and access the same download from there as well once the download is finished you'll have the installer for vcx serve and you can go ahead and launch it this is the 64-bit version for my 64-bit computer make sure to access it wherever you downloaded it to and go ahead and give it administrative privileges in order to run this will be a fairly simple process in order to go ahead and install it we'll choose the full type of install and the desktop shortcut's fine for me you can choose whether or not you want that and then the default file location in program files is fine for me i'm going to go ahead and hit install this will take just a moment here once the install is completed you can go ahead and hit close you'll also see this new icon pop up if you chose it called xlaunch and we'll be launching this later but for now let's go ahead and hold off let's open up that command line interface that we had access to before i'm going to go ahead and clear the screen in order to issue some commands the first command i'm going to issue is sudo apt update this will just update the repositories here on ubuntu that way we have access to the latest repos give this a few moments and once this is finished i'm going to go ahead and clear the screen again so we can issue another command we'll do sudo apt install and let's go ahead and choose our desktop environment i'm going to choose the xfce for desktop environment and i can install it by just typing xfce4 here at the end so it's sudo space app space install space xfce4 and i'm going to press enter now there's a lot of libraries that are required to install this desktop environment and you can see it's going to take about 824 megabytes of space if you're good with that you can go ahead and press enter for the default yes and the packages will begin installing as well as the dependencies that are needed for any of the packages that will be installed this will take a few minutes after everything has been downloaded and the install has begun we'll be asked what the default display manager we want to use for the givenx server i'm going with the default here the gdm3 i'll go ahead and press enter the install process will continue here [Music] and once everything's installed we're now ready to look up an address that we need so i'm going to clear the screen and type cat cat forward slash etc forward slash res olv dot conf for config and we'll press enter this will spit something out at us we'll make note of this name server address right here mine's 172.17 make sure to go ahead write this down and save it somewhere because we will be using it and following that let's open up a file i'm going to use my favorite text editor here nano and then after that use the home directory and open up bash rc so make sure you put the dot before bash rc and press enter now scroll down to the very bottom of the screen where we're going to create a new entry after you've gotten to the very bottom let's type in export space capital display equals now this is where the address that you just recorded comes into play so mine's 172.17.128.1 and then i'm going to put a colon and a zero after that once i'm ready i'm going to press ctrl x to go ahead and save the current file i'll type y to go ahead and save it and enter to overwrite it now we need to go ahead and reload this we'll type source tilde forward slash dot dash rc and press enter and we're very very close to finishing up here just a few more things at this point we can go ahead and run the x launch application that we got done installing earlier and in here you can go ahead and select whatever you want i'm going with the one window without a title bar that's the one i like the most i'm going to go ahead and hit next then i'm using start no client the first option in the default option hitting next everything is good in here as far as the default but i'm going to add an additional parameter for the vcx serve and that parameter is dash ac so make sure to go ahead and use that and hit next and now i'm finished with the configuration you can also save the configuration for later use so i'm going to do that right now and press save to wherever you want to save the config file and next time you can use that configuration in order to launch the vcx serve go ahead and press finish and that should load up a new screen it should be a black screen with nothing on it let's go ahead and go back to our ubuntu command line interface and launch one last thing and we should be ready all right back in this terminal we'll go ahead and type start xfce4 altogether one word and press enter that should start the xfce desktop environment and now if we go back to our vcx serve display we should have a desktop congratulations if you made it this far you've successfully done everything including install wsl2 on windows installed ubuntu 20.04 for wsl2 and install a desktop environment xfce for ubuntu that you can now access if you click on the roof file system you can navigate through your ubuntu file system on the bottom you have access to a file browser search a web browser a terminal and a few other things if you launch a terminal you can run htop which gives the current resource usage here currently system claims it's not really using any cpu but the memory usage here is about 333 megs out of 25 gigs we have 45 tasks with 136 threads running and a bunch of tasks in the background here all right i'm going to exit out of here and close this terminal well i hope you enjoyed this install of wsl2 ubuntu and a desktop interface if you did make sure to go ahead and smash that like button for me it really does help me out and also make sure to go ahead and subscribe below hit that notification bell for future linux and programming videos and if you want feel free to join our discord server where you can find linux community members and myself thanks for watching i'll catch you in another video
Info
Channel: SavvyNik
Views: 44,222
Rating: undefined out of 5
Keywords: wsl2 gui, wsl2, windows 10, wsl2 windows 10, wsl2 ubuntu gui, how to, wsl2 install, wsl 2 install, ubuntu, linux, ubuntu 20.04, wsl2 linux, how to install wsl 2, xfce, install wsl2, wsl 2, wsl ubuntu gui, wsl 2 ubuntu gui, wsl2 ubuntu, windows subsystem for linux, wsl, setup wsl 2, windows 10 wsl 2, wsl1, linux on windows, linux subsystem, getting started wsl 2, ubuntu on windows, linux kernel, wsl docker, how to install wsl2, subsystem for linux, ubuntu wsl, wsl linux
Id: 8SuERIEJJUA
Channel Id: undefined
Length: 14min 53sec (893 seconds)
Published: Thu Jul 30 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.