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

Поділитися
Вставка
  • Опубліковано 9 лип 2024
  • Windows development setup with WSL2, ZSH, VSCode Walkthrough! I'll show you which tools I'm using in my development setup for DevOps, Security research, and programming. We also cover how to customize your Linux Shell and other productive tools when working with the Windows Subsystem for Linux. #Windows #WSL2 #WindowsTerminal
    Install WSL2: docs.microsoft.com/en-us/wind...
    Nerd Fonts: www.nerdfonts.com/
    My GitHub Dotfiles: github.com/christianlempa/dot...
    Powerlevel10k: github.com/romkatv/powerlevel10k
    Yadm: yadm.io
    Follow me:
    TWITTER: / christianlempa
    INSTAGRAM: / christianlempa
    DISCORD: / discord
    GITHUB: github.com/christianlempa
    PATREON: / christianlempa
    MY EQUIPMENT: kit.co/christianlempa
    Timestamps:
    00:00 - Introduction
    00:29 - Why run Linux on Windows?
    01:16 - Windows Subsystem for Linux (WSL2)
    02:32 - Windows Terminal
    05:04 - ZSH and Powerlevel10k on Linux
    07:39 - YADM Dotfiles Manager
    09:37 - VSCode
    ________________
    All links with "*" are affiliate links.

КОМЕНТАРІ • 169

  • @meathead919
    @meathead919 2 роки тому +114

    Microsoft really caught up the last 5 years, wsl and wslg with vscode is absolutely mindblowing.

    • @isouravgope
      @isouravgope 2 роки тому +1

      its just a lite weight vm these days , during wsl1 there were some major issues like mounting a file img and other stuffs so they literally removed the whole llinux to windows binary translator and made wsl2 which uses a light weight linux kernel , though the main point i used wsl1 cause of the android adb and now it doesn't work at all in wsl2 as there is no binary translator so there is no bus access between windows and wsl...though everything's aside its a fluent tool and a light weight vm for developers on the go

  • @codeman99-dev
    @codeman99-dev 3 роки тому +53

    I'm absolutely loving up WSL2. Very excited for WSLg to be officially released.

  • @okidokiyowyow356
    @okidokiyowyow356 Рік тому

    Awesome video. I will setup my wsl2 tomorrow and I came across this video. It's really helpful

  • @samvanhamn
    @samvanhamn 2 роки тому +7

    This video needs about 1000 times the views it currently has. Fantastic content!

    • @christianlempa
      @christianlempa  2 роки тому +3

      Thank you so much! I'm glad you like it :)

  • @DevOpsHawk
    @DevOpsHawk 2 роки тому +6

    You're awesome Christian! I just joined membership program. Thanks a lot for this wonderful contents.
    PS. My favourite feature of WSL is split screen pane horizontal or vertical, love this :)

    • @christianlempa
      @christianlempa  2 роки тому +1

      Thank you so much 😃 and welcome to the community, bro! Oh yeah this feature is really awesome.

  • @dipstick555
    @dipstick555 2 роки тому +3

    Dope, thanks for not being boring

  • @faysoufox
    @faysoufox 3 роки тому +2

    Thank you, you have answered many questions I had.

  • @higgz17
    @higgz17 Рік тому

    OMG thanks for this tutorial, really needed it !

  • @mohammedabu-taleb8890
    @mohammedabu-taleb8890 3 роки тому +2

    This is great! Keep up

  • @ThePandaGuitar
    @ThePandaGuitar Рік тому

    Wow, great content. I installed WSL2 but was not exactly sure how it fits with the rest of the system. Great to have the best of both worlds!

  • @razaz03
    @razaz03 Рік тому +2

    Fantastic tutorial - also aged well!

  • @AMoktar
    @AMoktar Рік тому

    Thanks . Awesome video

  • @MinnaPerala84
    @MinnaPerala84 9 місяців тому +2

    Thank you for the walk through! I'm about to switch from macOS to Windows and want to get most out of it. Cheers!

  • @koplive3731
    @koplive3731 2 роки тому

    Thanks fireship!

  • @ARESCOM_PA
    @ARESCOM_PA Рік тому

    Thanks! This video is really helpful. Hope you come up with a newer video sort of an update to this one. Anyway, following your steps, I tried Cascadia Code and JetBrainsMono Nerd Font in my terminal and they look great too!

  • @FelipeOliveir4
    @FelipeOliveir4 2 роки тому +1

    I have been having problems with the vs code dont open from wsl ubuntu, ubuntu says that dont have permission to open vs code.

  • @Pervy
    @Pervy 2 роки тому

    slick stuff my guy

  • @invizible00
    @invizible00 2 роки тому +1

    Hi Christian, Thanks for a great video. I like your color so much

  • @mhmh_frhn
    @mhmh_frhn 2 місяці тому

    dotfiles not found to change color terminal

  • @oliver.travelling
    @oliver.travelling 2 роки тому

    This helped me a lot! Thanks for sharing this video

  • @bpdtaran
    @bpdtaran Рік тому +1

    Sir in your github repo I can't find your settings.json file for colour schemes!

  • @dimensionalilusions4520
    @dimensionalilusions4520 2 роки тому

    Hi there, the powerlevel10k theme and icons are not showing properly in vscode but it works perfectly on windows terminal

  • @norvegrvagr
    @norvegrvagr 4 місяці тому

    Thant you! Very informative! Always forgot to subscribe watching your helpful videos..( Now it's time to subscribe. Your content is great!

  • @marcoroose9973
    @marcoroose9973 2 роки тому

    Ich habe vor kurzem auf Windows 11 umgestellt. Die Kombination aus WSL und dem neuen Windows Terminal ist einfach großartig, ich bin super zufrieden.

    • @christianlempa
      @christianlempa  2 роки тому

      Cool! Danke das zu hören, und ja finde ich auch :)

  • @tajsec498
    @tajsec498 2 роки тому

    thanks for this great video, I had a question about zsh , How to enable cursor blinking in windows terminal ?? (I'm using wsl2 )

  • @Liam-ey2gs
    @Liam-ey2gs 2 роки тому

    Do you by chance have a video on how you configured Arch on wsl?

  • @eduardocortinas3800
    @eduardocortinas3800 2 роки тому +1

    How did you get your terminal in VSCode to render properly? Mine looks weird when using the FiraCode Nerd Font Mono font in it.

    • @christianlempa
      @christianlempa  2 роки тому +1

      Some don't work so well, I think I'm using the Retina Font that works mostly.

  • @JanisWalliser
    @JanisWalliser 3 роки тому +3

    Any thoughts on IntelliJ as IDE? It has gotten lots of improvement in regards to WSL the last few releases.

    • @christianlempa
      @christianlempa  3 роки тому +3

      I generally don't like any JetBrains IDE, but this is probably just my personal taste. Objectively they're not bad, I just don't like the feeling... 😄

  • @irfanyudi4650
    @irfanyudi4650 Рік тому

    hi :)
    how to acsess postgresql in windows with wsl2 ?

  • @pighuizhi7364
    @pighuizhi7364 11 місяців тому

    Are there a specific installation instruction videos? Although the relevant documentation is listed in the video description, I am concerned that doing it wrong will prevent you from falling back to a clean environment. This will always go wrong.

  • @alphenit
    @alphenit 2 роки тому +1

    great content as always!!! I've watched this tutorial and your Docker VSCode Python Tutorial, Run your App in a Container video.
    Only thing I was missing in those video's is where do you use Git? There are so many possibilities. (code directly in WSL within a venv, download a python container and use that etc etc) Using Git(hub) to track your code is essential. So my question is, where do you do your code commits when using vscode with WSL and Docker?

  • @user-eq8ks8mr8s
    @user-eq8ks8mr8s 2 роки тому +1

    Thank you for the great video! I learnt about yadm from you today!!!! awesome

  • @cryzz0n
    @cryzz0n 2 роки тому

    Thanks mate, currently I'm quite new to linux, in my new job we use Virtual Box to use Ubuntu. So with this method we dont actually need to use the Ubuntu gui to run a web browser or vscode, we still use those tools in the windows os, is that how it works, thanks!

  • @darthvader4899
    @darthvader4899 3 роки тому +1

    When i execute ls
    the folders and files have a high contrast purple and their name is blue so its hard to read and see
    how can i make it like yours??

    • @christianlempa
      @christianlempa  2 роки тому

      I'll update the colortheme soon. That will make things better :)

  • @jj-icejoe6642
    @jj-icejoe6642 2 роки тому

    Just format, install Arch and AWM + ZSH done ! No more winbloat with Microsoft and Google big brothers watching you all time !

  • @javilionaire
    @javilionaire Рік тому +1

    Hey, it looks like the windows folder is missing from your dotprofiles github repo, can't find your settings.json :(
    Also, i noticed there's a .bashrc file as well. Have you moved away from zsh?

    • @christianlempa
      @christianlempa  Рік тому +1

      Ok yeah, you can find it now on my other repo dotfiles-win

  • @techinsider3611
    @techinsider3611 3 роки тому +3

    Loved it bro. Love from Pakistan.

  • @theprimecoder4981
    @theprimecoder4981 2 роки тому

    Everytime I enable wsl I get blue screen when I shift my laptop

  • @SL_Beast
    @SL_Beast 5 місяців тому

    there is a problem though you can't access wlan0 through wsl2 if you don't have windows10 pro because in order to access wlan0 through wsl2 you need to have hyper v enabled and hyper v is only available in windows 10 pro

  • @sadokabdelbasset3226
    @sadokabdelbasset3226 Рік тому

    sir i'm using wsl too, i dont know how to setup vpn in it, can you help me please

  • @darthvader4899
    @darthvader4899 3 роки тому +2

    How do you have icons when you list files in folder??

  • @ahmadanis9930
    @ahmadanis9930 3 роки тому

    Great work. Appreciation from Pakistan

  • @TheFeaz
    @TheFeaz 6 місяців тому

    Stupid questions... but I can't seem to find the Windows JSON files like you're showing there in your GitHub....There is no "Windows" under "Main". ???

    • @christianlempa
      @christianlempa  6 місяців тому

      I think they have changed a lot in their config support recently, not sure where it is now

  • @themohtab
    @themohtab 3 роки тому +1

    what tools do you use for recording/editing videos ?

    • @christianlempa
      @christianlempa  3 роки тому +2

      For recording I use OBS, and for editing I recently switched from Premiere Pro to Davinci Resolve. Absolutely amazing tools in my opinion 😄

  • @n001sourabhmahto3
    @n001sourabhmahto3 Рік тому

    where is the json file for color schemes?

  • @nekratesblanoirc2951
    @nekratesblanoirc2951 2 роки тому

    Your terminal looks clean !, whats font are you using (also, are you using Windows Terminal or ..) ?

    • @christianlempa
      @christianlempa  2 роки тому

      Yeah, Windows Terminal and WSL customizations ;)

  • @tiamatjax7819
    @tiamatjax7819 Рік тому

    do you need windows pro edition?

  • @coderboyakash5853
    @coderboyakash5853 2 роки тому +1

    Hi how you are running two bash shell in one tab of terminal like bash1, *bash2

    • @christianlempa
      @christianlempa  2 роки тому

      You can tile the windows with a hotkey in the Windows Terminal, that's pretty useful

    • @coderboyakash5853
      @coderboyakash5853 2 роки тому

      @@christianlempa actually I have asked that because I need the feature that new tab open in current tab

  • @hackerspider1
    @hackerspider1 2 роки тому

    Did you change it on github couldn't find some files was thinking to use same colors in iterm2. As I am already using Oh my ZSH and powerlelvel10k.

    • @christianlempa
      @christianlempa  2 роки тому

      I organized the files a bit differently, and also switched my prompt the last months, so yeah might be an update.

    • @hackerspider1
      @hackerspider1 2 роки тому

      @@christianlempa why don’t you make same for iterm? I have tried to get same colors but looks different. I loved your one can you please make one for mac.

  • @PostcardsFromJapan
    @PostcardsFromJapan 4 місяці тому

    WSL is a godsend and the best thing that ever happened to Windows!

  • @spirosfraganastasis5322
    @spirosfraganastasis5322 Рік тому

    Thanks for the video Christian! I have subscribed to your channel and will keep an eye on any updates! I just wanted to ask your opinion for Ansible on WSL.
    Thanks

  • @gopikrishna679
    @gopikrishna679 Місяць тому

    A lot of commands like chmod, du, df, tr , etc don’t work in the windows terminal. Its really very frustrating working with linux in windows

  • @darthvader4899
    @darthvader4899 3 роки тому +1

    Can you share your WindowsTerminalIcons folder please ?
    btw GREAT VIDEO thanks a lot

  • @Ravik-no6wx
    @Ravik-no6wx 2 роки тому

    Any tips on changing terminal colors inside vs code? I mean - change the directory colors, directory background etc.

  • @noelanaya2912
    @noelanaya2912 2 роки тому

    I've a question, i'm working actually in a web development, but when i open a live server, i can't open the ip of the live server with Windows. Do u know how can i solve it?

    • @christianlempa
      @christianlempa  2 роки тому

      hmm not sure, maybe you can take a look at our discord for help

  • @alfredoolmedo744
    @alfredoolmedo744 4 місяці тому

    I'm agree it's just a Tool to Achive Something.

  • @mdshamratapugazi610
    @mdshamratapugazi610 2 роки тому

    slanting style shows ugly in vscode terminal even after changing font family in vscode. please help fix this.

    • @christianlempa
      @christianlempa  2 роки тому +1

      Well, that's always going to be an issue, I haven't found a great fix for that in vscode either :/

  • @hugo9577
    @hugo9577 2 роки тому +1

    How can I get those color Schemes for zsh terminal ? those aren't in your github settings.json repo!

    • @christianlempa
      @christianlempa  2 роки тому +2

      The color schemes are in the settings file, but I also did some customizations to the color codes used by powershell that are in the .p10k file. Hope this helps :)

    • @hugo9577
      @hugo9577 2 роки тому

      @@christianlempa Yes! I checked all the color schemes of the settings file but non of those are the ones from this video. This personalization looks awesome! Is it possible to get them?

    • @christianlempa
      @christianlempa  2 роки тому

      @@hugo9577 still not sure, I'll check the repo later. But feel free to send me a DM on Discord if you don't find it.

  • @PrasannaVarshan
    @PrasannaVarshan 2 роки тому

    Really? this guy just have 15K sub? Common humans, be respectful and sub for talents like this!

  • @ericksonjosephsantos1964
    @ericksonjosephsantos1964 2 роки тому

    Can we relaunch the setup wizard for powerlevel10k??

    • @christianlempa
      @christianlempa  2 роки тому

      Yes you can execute the p10k configure command again

  • @tirthachatterjee
    @tirthachatterjee 2 роки тому

    Building 32bit embedded system not possible on WSL / WSL2.

  • @marcelodevops
    @marcelodevops 3 роки тому

    You have a great theme for VS Code. Is It an extension?

    • @christianlempa
      @christianlempa  3 роки тому +6

      Thank you mate! This is a vscode theme that I'm currently making myself. I'll make it available as an extensions, soon. I'll let you know once it is available :)

    • @ericksonjosephsantos1964
      @ericksonjosephsantos1964 2 роки тому +1

      @@christianlempa up fo this

  • @demianhavdun5385
    @demianhavdun5385 2 роки тому

    VS code debugging peformance issues on WSL2 make me cry. But great setup besides that

  • @dhawang.gayash4080
    @dhawang.gayash4080 Рік тому

    I love what wsl2, which helps one not to worry about CRLF/^M line feeds.
    But honestly, just pay $500-750 more and get a Mac. BTW writing code on VM is a pain. Don’t get me started on debugging.
    Way too many layers….

  • @UltimateKeyboardHero
    @UltimateKeyboardHero 2 роки тому +1

    I was using this for a while, then I had trouble setting up minikube, so I stopped. :/ Guess I'll give this another shot

    • @christianlempa
      @christianlempa  2 роки тому +1

      Haven't tried minikube, yet. I just did one installation of microk8s, which seems to be pretty similar. But recently I found it easier to just go with Docker Desktop, btw the Kubernetes extension of it is also great!

    • @UltimateKeyboardHero
      @UltimateKeyboardHero 2 роки тому

      @@christianlempa thanks for the insight. Will try it out with microk8s, minikube and kind were problematic. Yea you can have Docker on desktop and still have it running in your WSL env. That was useful haha.
      I'm quite new to DevOps, keep up the amazing content yo. Much love from Lanka!

  • @OfficialTkStar
    @OfficialTkStar Рік тому

    Sere the great..

  • @anhkhoalouisnguyen9958
    @anhkhoalouisnguyen9958 2 роки тому

    👍

  • @N30Z3R0
    @N30Z3R0 3 роки тому +3

    ca-careca do adrenaline? 😳😳😳

  • @matinsen1980
    @matinsen1980 3 роки тому +5

    Where do I find that distribution? "Arch Linux"

    • @christianlempa
      @christianlempa  3 роки тому +1

      I used this project here: github.com/yuk7/ArchWSL , but note it's not liked by the Arch devs :D

  • @dash2212
    @dash2212 Рік тому

    Are the dotfiles gone? 😢

    • @christianlempa
      @christianlempa  Рік тому +1

      You should find ‚em on my dotfiles-win repo

  • @markojozic3944
    @markojozic3944 3 роки тому +1

    Found this channel via odysee :D

    • @christianlempa
      @christianlempa  3 роки тому

      Haha nice :D Are you watching it on YT more or on Odysee? Just curious :)

    • @danyielsanchez5159
      @danyielsanchez5159 3 роки тому

      @@christianlempa Well, in my case more and more often I stay on Odysee. Of course many channels that I follow only publish on YT. But it's so good that Odysee is growing.

  • @timothygibney159
    @timothygibney159 3 роки тому

    I love th flexibility of Linux window managers but hate xorg and gnome 3

    • @christianlempa
      @christianlempa  2 роки тому

      Well in Linux you're not forced to use it right? :P

  • @CasualBIL
    @CasualBIL 3 роки тому +1

    How do I get icons when using the 'ls' command? Is there a plugin you are using?

    • @christianlempa
      @christianlempa  3 роки тому +2

      I'm using the "exa" project: github.com/ogham/exa, I just created an alias in my zshrc file calling exa with --icons parameter

  • @r0mankon
    @r0mankon 2 роки тому

    Why not use git instead of yadm? I didn't get it.

  • @tomekkicaj700
    @tomekkicaj700 9 місяців тому

    Love your hair setup for linux dev too

  • @neilgreene
    @neilgreene Рік тому

    May have already been asked. But, I use the same color theme you have with my desktop and ALL of my trading software, charts, trading platforms. Can you share your VSCODE color theme - I am guessing it has already been asked. So, sorry for the repeat!

  • @moeinmhzg7827
    @moeinmhzg7827 2 роки тому

    Awsooooome

  • @Rdrudra99
    @Rdrudra99 2 роки тому

    Vs Code theme name?

  • @lucasg7282
    @lucasg7282 2 роки тому

    More easy install one distro :)

  • @jaycodes8790
    @jaycodes8790 2 роки тому

    But i have window home basic.... WSL doesn't work on that.

    • @GustavoVeraScuderiPY
      @GustavoVeraScuderiPY 2 роки тому

      It should work if you have Windows 10 or 11 and virtualization enabled on your CPU (VT-X on Intel and SVM fffor AMD)

  • @lbasavaraj
    @lbasavaraj 3 роки тому +4

    WSL2 just kills my memory, hope it’s better on Windows 11

    • @codeman99-dev
      @codeman99-dev 3 роки тому +3

      You can limit WSL2 with a simple config. Search for "WSL2 memory limit".
      Of course if you are experience memory problems it is probably because you are really stressing the subsystem with multiple containers (both WSL2 & docker apply here). In which case, it actually falls more on the docker team than it does the host operating system. The Hyper-V system is still very very new.

    • @hansphung
      @hansphung 3 роки тому

      I’m using WSL2 on Windows 11. It is not any better.

    • @christianlempa
      @christianlempa  2 роки тому

      Has anyone found out what the problem is there? I got this response from other people as well, but the only way seems to limit the memory of WSL in the config file.

    • @hansphung
      @hansphung 2 роки тому

      @@christianlempa or upgrade you RAM to 32G 😁. I'm a Magento developer and Magento itself is heavy and resource consuming. Limit the memory in the config file does not work for me as it sometimes causes weird issues like Elasticsearch container dies for no reason.

    • @christianlempa
      @christianlempa  2 роки тому

      @@hansphung yep thats also a good solution 🤣

  • @darthvader4899
    @darthvader4899 3 роки тому

    Can you actually show us step by step how to do it for noobs like me please

  • @sabbirahamedmaruf322
    @sabbirahamedmaruf322 2 роки тому

    Try Garuda linux.

  • @KevinFarleyWV
    @KevinFarleyWV 2 роки тому

    I'm late to the comments but after using WSL2 for more than a year, I think I have some valid experience. If you were never a Linux user, then sure, you might like WSL2 and think you are running Linux. When you want to really develop code and have solid access to hardware, you will find yourself frustrated at the complexity of going the WSL2 route vs running native. Just my experience from a firmware engineer with 19 years experience in Linux. After listening to his explanation of customizing the terminal and shell, I have to say that's unnecessary in Linux. This is just my opinion, but if I was allowed to erase Windows off my work machine, I'd install Linux and never use Windows again.

  • @trinib1
    @trinib1 3 роки тому +1

    mind reader

  • @anjanbora7943
    @anjanbora7943 2 роки тому

    It seems using wsl u format ur hair 💋

  • @SpaceTimeBeing_
    @SpaceTimeBeing_ 3 роки тому +1

    Linux is great enough, it is weird when people stay on windows adamantly when they don't even use windows only apps. You can even game on Linux now.

    • @codeman99-dev
      @codeman99-dev 3 роки тому +3

      As a software developer, I hate this stance. We now have official support for linux from a trusted company without needed to convince our employer to trust a "linux company" (such as Red Hat or Canonical).
      Plus it means that I don't need to mess with the host operating system, which was probably modified by my employer's IT staff. So I get to have my preferred environment, AND keep my co-workers on the IT team happy.

    • @TR1AGE
      @TR1AGE 2 роки тому +4

      Based on personal experience, I'd say weak adoption of Linux is largely due to the graphical desktop experience.. Linux is great for headless applications, but desktop environments (unity, plasma, etc) still have a long ways to go. DEs remain buggy and unstable even on totally standard hardware setups. Most professionals just want an OS that gets out of their way, so they can do their real jobs.

  • @adrian333dev
    @adrian333dev Місяць тому

    humpty dumpty in alternative universe

  • @familyshare3724
    @familyshare3724 2 роки тому

    Windows-WSL2 networking sucks. Vanilla Linux is the best development environment, bar none.

  • @etaashmathamsetty7399
    @etaashmathamsetty7399 2 роки тому

    bro just use linux at this point...

    • @christianlempa
      @christianlempa  2 роки тому

      Nope

    • @etaashmathamsetty7399
      @etaashmathamsetty7399 2 роки тому

      @@christianlempa why, I switched to linux for coding and now I use it as my daily driver
      for c++, linux is necessary

  • @uenmedia4528
    @uenmedia4528 10 місяців тому

    You created a fake video, and you're providing explanations without full transparency. When sharing links, you make it seem like you're generously sharing valuable information, but the links lead to different content. Are you attempting to deceive people? The Dotfiles link appears to be fake as well. What will you ask for next, a Patreon subscription to access these links? This approach is quite frustrating. I'm sorry, but this isn't a legitimate way to earn trust or credibility. Ultimately, you may lose credibility with this approach.

  • @KhomoBumble
    @KhomoBumble 2 роки тому

    Win sucks for development. Once you will try mac - you will never come back. WSL dont make life easier.
    Want linux - try real ubuntu.

  • @thegenxgamerguy6562
    @thegenxgamerguy6562 Рік тому

    Regolith desktop on Linux.
    I just don't want to drag windows around anymore and I hate taking my fingers of the keyboard.
    For development: JetBrains Rider.
    Shell: zsh on kitty