Windows development setup with WSL2, ZSH, VSCode, and more

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
in this video i'll walk you through my entire windows development setup and show you some tools i'm using in my daily workflows when i do programming devops or network security work and of course i show you some tips and tricks when using these tools how you can easily customize them so that you can use windows as your main desktop operating system but still have a pretty great linux experience all well integrated with the rest of your system [Music] although this video is about my windows setup we will cover a lot of linux stuff here too because i absolutely love linux and i use many of the free and open source tools that are available there but to be honest guys i'm not a fan of any of the linux desktop environments i've talked about this in previous videos before and i really don't want to step into another operating system discussion again because in the end it really doesn't matter if you're running linux windows or mac os in my opinion you should always just pick the best tool for the job in my case that's just windows when it comes to working with graphics or office programs like microsoft 365 or just play some computer games but when i want to do software development use devops tools like docker or ansible then that's working better on linux of course and i want to be able to get the best of both worlds so that's why i'm running the windows subsystem for linux or as i just call it wsl so that's a very essential component for my overall development setup on windows because with windows subsystem for linux you can set up your own small virtual machine with a linux distribution like ubuntu or kali linux for example natively integrated into windows and for me that's just working perfectly to install wsl2 on windows just follow the official guide on the microsoft blog i've put your link in the video description down below check it out and first of all you will need to enable some features in windows 10 the virtual machine platform and the windows subsystem for linux of course when you just download and install the linux kernel update packages simply follow the instructions and then you go to the microsoft store and download a linux distribution like ubuntu for example that's a great start especially for beginners i'm also using kali linux for most of my security researching because kali linux is a great distribution that comes with many free and open source cyber security tools by the way i've done a separate video on setting up kali linux in wsl 2 with a graphical user interface as well so if you want to take a look and know how to set up this i've put your link in the description down below if you want to get into hacking or cyber security well you don't want to miss that so once the setup is complete you can open your linux distro just like a normal windows application but that's not looking very great the terminal is also very limited so i'm not using the default terminal instead i'm using another application for that that's called the windows terminal so this is a free and open source software that's developed by microsoft itself and you will find it in the store as well it offers you nice features like different color schemes customizations but also productive features like url recognization tiling terminal windows and it also supports all other shelves like the old fashioned command line on windows the azure cloud shell or also powershell i've done many customizations to make the terminal look exactly the way i want it to look by editing the settings config files and create my own color schemes and use a different font so if you want to make your windows terminal just look awesome as well you need to set up two things here so first one is to enable the icon support in the windows terminal that's used by many modern terminal applications on linux you may need to install a special font like the nerd phones for example simply just go to the nerdfront homepage go to the download section and pick a font that works for you note not all fonts will work great with a windows terminal you may need to try out a few so once you have downloaded the font extract the archive install the font in windows and then you can change the font inside the windows terminal settings by editing the settings.json configuration file or use the new menu that's introduced in windows terminal preview version put the name of the font there and when you're using a terminal command that will display icons for example the exa program or other shell themes for example then you should immediately see if it's working i'm using the fira code nerd font for example because i like the way it looks and it just works best on my terminal setup on both vs code and windows terminal the second one is you can set up a color scheme so i'm using a color scheme that uses some blue and purple colors which fit pretty well with a digital live design and in the video description you will find a link to my github repositories like the dot files repo as well where i store my config files for the windows terminal and also my personal home folders in wsl so you can just go to the settings menu on windows terminal and edit the zx.json config file again to just copy the color scheme templates from a dot files and put it into your own settings so that you can just use the same color schemes as i do or just create your own one if you want to do that so if you set up these two things the terminal looks a little bit better than the original one but i've also done other customizations to the shell because i'm not using the default bare shell that you are probably familiar with i've installed an alternative shell on linux that is called zsh so zsh is similar to bash but it adds more features to it for example you can customize zsh completely and extend it with plugins so you should take some time to get started with csh because it is extremely powerful and allows you to do many many things which will make your life in the linux terminal just easier and it uses the similar configuration files to just what bash does located in your personal folder but this file is called the zshrc file so in this configuration file you can define which plugins and extensions to load and set up all other environment stuff seo shell alias commands variables and so forth so for example i've installed the power level 10k theme for zsh which comes with a really cool design and gives you many options and also integrates some productive features for example the git repository plugin which is really helpful in my previous tutorials i've installed the extensions with all my zsh but to be honest guys i'm not don't like all my zsh or other plugin managers anymore because they are really unnecessary i now tend to write and edit my own cshrc config files and just load all the plugins and extensions manually from there installing zsh and power level 10k is also really simple so first of all just install zsh through your package manager on ubuntu for example that's just sudo apt install zsh and once you set up this your default shell by executing zsh and enabling it you can clone the power level 10k github repository and put it inside your personal folder and then you simply just need to add this line into your dot zsh or c file to load the power level 10k extension at startup if you haven't configured the theme it will first guide you through a setup wizard so to set up all your settings how the zsh theme should look and so on and once you have completed the setup it stores all the settings in a dot p10k file that's also located in your personal home folder i've done other customizations and changed some of the scripts inside both of the files to change a little bit the behavior of the theme and make it look a bit better together with my custom color scheme again if you want to take a look at my dot files and use them as an example or just blindly copy them into your own personal home folder then just check out my dot file repository on github and because i'm too lazy to copy my dot files to every new installation of wsl when i want to synchronize my dot files across multiple machines there is a pretty cool solution that's built on top of git i'm using for that and this is called yetim or this stands for yet another dot files manager and it is a nice free and open source project that manages all your dot files so just go to the official home page yet m.i.o to learn more about this project and download it on your linux machine on ubuntu and debian this is available in the apt package manager so just enter sudo apt install yetem and it should all work so what i absolutely love about yadam is that when you know git you know how to use yeta because it is just an extension for the git framework and it executes git's command under the hood and you can just use the same commands to clone pull and push changes with yellow as well as you would do it with git the major difference is that janum will clone the repository directly into your home folder and that makes it very easy to manage your dot files across multiple machines you can also add more files to the repository track that you want to synchronize for example i'm synchronizing my zshrc my.p10k configuration files for my zh themes extensions and other stuff as well so if you are using vim with custom config files or extensions you can also synchronize these files as well or do you have any scripts that you want to store or synchronize across your linux machines the possibilities are endless and yet m also features some of the example repositories on their homepage where you can just take a look and get familiar with the way how you can use it so that's the way i'm synchronizing my zshrc or my power level 10k theme configuration files across multiple machines i also have added some configuration files for new fetch which will create an awesome the digital live logo for example you can do pretty cool stuff with that and if you're really working a lot in wsl 2 or on linux this will be a very very useful tool for you but let's come to another important development tool that i'm running on windows but it also works well with all the other tools and that's called visual studio code or just called vs code so this is a free and open source ide you mainly use for software development so for example when you're programming with python javascript go or whatever and it is extremely lightweight and highly customizable it is a great tool that i use for many things not just for programming and i also use it as a text editor or when i connect to remote machines over ssh to edit any configuration files or work on deployment yaml files for devops tools like ansible vagrant or terraform so those tools worked perfectly together with vs code and wsl you will need to install two extensions in vs code to work on remote machines and on your windows subsystem for linux environments so the first one is the remote wsl which will allow you to connect vs code to your windows subsystem for linux machines and the second one is remote ssh where you can use vs code to work on remote machines through an ssh tunnel so with both extensions you can just click on the icon in the bottom left corner and connect it either to your remote wsl machine or to a remote server via ssh so once vs code is connected you can just use a terminal directly in this code to open it on the remote machine or just open and edit any files from the machine natively so you may need some time to get used to it but trust me it is just awesome when you can use your existing vs code setup and work on that remote machines where you would otherwise need to play around with the terminal text editor or anything else it is just very very comfortable to work this way and it's exactly the reason why i'm using this setup i'm also using vs code when i work with docker and docker desktop so i've made a separate tutorial about this if you're interested in learning how you can use docker with vs code to develop your own applications in a container then check out my video i've put your link in the description below of course and that's it that's my windows development setup so far i hope this was interesting for you guys and you could also get some ideas for your own setup as well please let me know in the comments which tool you are using on windows and linux and if you enjoyed this video then please don't forget to hit the like button and of course subscribe if you want to watch more content and tutorials for it professionals so thanks everybody for watching i see you in the next video bye bye
Info
Channel: Christian Lempa
Views: 178,296
Rating: undefined out of 5
Keywords: windows development setup, windows development, windows development environment, windows development tutorial, linux vs windows development, web development setup windows 10, setup for software development, setup vscode for c/c++ development on windows, windows 10, windows subsystem for linux, windows tutorial, my linux setup, my ubuntu setup, software development, wsl2 windows 10
Id: oF6gLyhQDdw
Channel Id: undefined
Length: 12min 1sec (721 seconds)
Published: Tue Jun 29 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.