How To Run Linux Code on Windows with WSL 2 & VS Code

แชร์
ฝัง
  • เผยแพร่เมื่อ 25 ธ.ค. 2024

ความคิดเห็น •

  • @TypeScriptTV
    @TypeScriptTV  ปีที่แล้ว +4

    If you have problems activating hardware-assisted virtualization (required for WSL2), this guide will help you: typescript.tv/hands-on/docker-desktop-hardware-assisted-virtualization/ 📖

  • @thomasfsr
    @thomasfsr 10 หลายเดือนก่อน +19

    You promised nothing and delivered everything! Thank you bro

    • @TypeScriptTV
      @TypeScriptTV  10 หลายเดือนก่อน

      Thank you!! I really like working with WSL2. 🙂

  • @kevincrowe7832
    @kevincrowe7832 9 หลายเดือนก่อน +4

    Really appreciate this video. the "rm -rf" command was specifically the problem I was having and I'm happy you brought it up within the first minute or so of the video.

  • @pkn8707
    @pkn8707 2 ปีที่แล้ว +11

    Thanks Benny! The way you have structured the topics , it is really easy for a beginner to grasp it in one go. If a beginner can understand then anyone can do it.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      It's very nice of you to tell me that. Wishing you a lot of fun using the Windows Subsystem for Linux! 👍 Best, Benny

  • @domnicdodeva3290
    @domnicdodeva3290 ปีที่แล้ว +3

    This video helped a lot to understand how visual studio code, wsl works. Thank you for helping out

  • @srinivasmekala1189
    @srinivasmekala1189 2 ปีที่แล้ว +6

    Thank U for posting this video.... I installed WSL recently and stopped using coz I can't see the files I created through ubuntu in my file explorer. You helped me a lot. Thank you very much.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +3

      My pleasure. On Windows 11 the WSL 2 even supports Linux GUI apps. Wishing you lots of fun using it! Benny

  • @kingkiller4630
    @kingkiller4630 11 หลายเดือนก่อน +1

    almost lost em at the free halo infinite im glad you pulled through and kept on with the tutorial

  • @BlancheNuit
    @BlancheNuit ปีที่แล้ว +1

    thank you this is very useful. I was getting depressed (big word) writing code on virtualbox(because needed linux environment) because the lagg was getting to my nerves.
    This is going to make my life so much happier

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      VirtualBox lag getting you down? No worries, my friend... armed with WSL, you're about to get lightning-fast speeds! 🚀 Best, Benny

    • @BlancheNuit
      @BlancheNuit ปีที่แล้ว

      @@TypeScriptTV I just got WSL (+ ubuntu) and its extension on VSCode and it's amazing !!

  • @abraund
    @abraund ปีที่แล้ว +2

    Win+v, well that one has evaded me for a long time. Great guide, cannot believe how easy it is.

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Happy that it helped you! 👍 Please share my channel if you would like to support it. 😃

    • @abraund
      @abraund ปีที่แล้ว

      @@TypeScriptTV and yet does anyone messing around with Linux on a Saturday afternoon have a social media following 🤔 good luck either way!

  • @gregmasters7420
    @gregmasters7420 ปีที่แล้ว +6

    What a great video. Thank you for taking the time to help a novice like me to get this running!

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว +1

      You are very welcome! We were all beginners and will be beginners again with the next evolution of software. 💫 Best, Benny

  • @borisdorofeev5602
    @borisdorofeev5602 หลายเดือนก่อน +2

    Man VSCode has gotten so cool. Yoo dont have to click the green button to load a Linux Terminal. You actually have a drop down menu on the terminal in VSCode and you can switch between different terminals within the working session.

  • @matiasrisso5917
    @matiasrisso5917 2 ปีที่แล้ว +4

    Amazing, detailed but easy to follow and understand!

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Thank you! What a great feedback. ⭐ Best, Benny

  • @DanielSchmidt-le4og
    @DanielSchmidt-le4og 2 ปีที่แล้ว +5

    Great video, thanks Benny! Your tutorial video helped me a lot 🙌

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +3

      Happy to help! Windows 11 Build 22000 or higher even supports running Linux GUI apps: docs.microsoft.com/windows/wsl/tutorials/gui-apps

    • @AnasthassiaMurillo
      @AnasthassiaMurillo ปีที่แล้ว +1

      @@TypeScriptTV do you recommend to update to Windows 11?
      I recently bought a Huawei laptop with Ryzen 5 5600 CPU and I've heard Windows 11 doesn't work so well with Ryzen processors and that makes me hesitant about updating to Windows 11.

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว +1

      @@AnasthassiaMurillo I have upgraded to Windows 11 a while ago and it's working well for me. 🙂 My desktop PC has an AMD Ryzen 7 3700X processor.

    • @AnasthassiaMurillo
      @AnasthassiaMurillo ปีที่แล้ว

      @@TypeScriptTV thank you for your quick reply!}

  • @aomo5293
    @aomo5293 ปีที่แล้ว +1

    Thank you Bro, you helped me fixing one issue; may ALLAH gives you the best;

  • @Jay2Ops
    @Jay2Ops ปีที่แล้ว +1

    Thanks for the video. I had toiled for hours.

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว +1

      Thank you for your comment. Producing this video becomes totally worth it when we can save precious hours in a developer's life. 😀 Best, Benny

  • @dianaawino
    @dianaawino 2 ปีที่แล้ว +2

    Thanks alot....some really insightful info for beginners like myself👏👏👏👏👏

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Happy to hear that this was helpful for you. Are you also programming with TypeScript?

    • @dianaawino
      @dianaawino 2 ปีที่แล้ว

      @@TypeScriptTV yes...i'm quite new to the whole typescript experience.... and so excited🤓🤓 about this programming journey

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      @@dianaawino that's nice to hear! I am currently releasing one tutorial per week. Tomorrow I will upload a video which explains generic functions. If you like, you can subscribe to this channel to be informed about it. Best, Benny

    • @dianaawino
      @dianaawino 2 ปีที่แล้ว

      @@TypeScriptTV sure thing..thanks

  • @앤드류-d7c
    @앤드류-d7c ปีที่แล้ว +1

    Thanks Benny! Great Video!

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Happy to help! All the best from Berlin. 🙌

  • @mohamedmagdy2816
    @mohamedmagdy2816 2 ปีที่แล้ว +1

    Good explanation, i really needed this video since i would start in kubernates project.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Happy to hear! Are you working on an Open Source project? :)

  • @LibraryOfTheOligarchs
    @LibraryOfTheOligarchs 10 หลายเดือนก่อน +1

    extremely helpful! Appreciate you!

  • @_indrid_cold_
    @_indrid_cold_ 11 หลายเดือนก่อน +1

    Brilliant explanations!

    • @TypeScriptTV
      @TypeScriptTV  11 หลายเดือนก่อน

      Thank you very much! ☺ Comments like yours are the currency I crave. 😁

  • @SreesaSarma
    @SreesaSarma ปีที่แล้ว +1

    Amazing video !!
    Thanks a lot!

  • @quachbinh0503
    @quachbinh0503 2 ปีที่แล้ว +1

    Exactly what I needed. Thank you so much.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Happy to help and thanks for leaving a comment. 👍 Best, Benny

  • @vitaminsee
    @vitaminsee ปีที่แล้ว +1

    thank you, this was very informative and easy to follow.

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Thank you so much for your kind words. All the best for your coding journey!

  • @forexmeter3900
    @forexmeter3900 ปีที่แล้ว +1

    Very well explained, thank you!

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Thank you! Always happy to help. ☺ Best, Benny

  • @lucareneambos3438
    @lucareneambos3438 2 ปีที่แล้ว +1

    Great Video!!! 🔥🔥🔥 Love the German accent! ♥

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      I cannot hide my roots. 😂 Happy that you liked the video. 😊 Benny

  • @chacquito1862
    @chacquito1862 2 ปีที่แล้ว +4

    This was super helpful and clear! Very appreciated, thank you!

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      Thank you for your kind words. 🙇 Best, Benny

  • @adefrawy
    @adefrawy 2 ปีที่แล้ว +1

    Great video, exactly what I needed. Thanks

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      Happy to help! Let's rock Linux together! 🚀

  • @johnkrumpotick8659
    @johnkrumpotick8659 2 ปีที่แล้ว +1

    You answered my questions, thank you.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Cool. Thanks for letting me know. 😊

  • @lapracity884
    @lapracity884 ปีที่แล้ว +1

    Super helpful! why are u so close to the camera tho

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      I only had a fixed focal length lens available back at that time. 🫥

  • @jinxinglim1855
    @jinxinglim1855 2 ปีที่แล้ว +1

    Really great video. thank you!

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Thanks for taking the time and posting a comment! 😊

  • @brunosoltoo
    @brunosoltoo ปีที่แล้ว +1

    that's awesome! I thought It would be necessary to install vscode in the wsl distro too.

  • @Александр-й8ы6и
    @Александр-й8ы6и 3 หลายเดือนก่อน

    Great tutorial, thank you!

  • @tur8008
    @tur8008 2 ปีที่แล้ว +1

    That's coool! Thank you!

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Glad you like it! Fist bump! 🤜🤛

  • @stephan19912710
    @stephan19912710 2 หลายเดือนก่อน

    Great video! Thanks a lot

  • @YouAreTheRaidBoss
    @YouAreTheRaidBoss 2 ปีที่แล้ว +2

    Stark Bruder!

  • @guidoperezmoro8331
    @guidoperezmoro8331 5 หลายเดือนก่อน +1

    You're awesome dude

    • @TypeScriptTV
      @TypeScriptTV  5 หลายเดือนก่อน

      Haha, thank you! But what about my video? 😅

  • @jefersonlima3524
    @jefersonlima3524 2 ปีที่แล้ว +1

    Great video. Helped me a lot configuring my environment. A question for you: How you got that smooth fonts on Windows? They look a lot like Linux font rendering, not ClearType.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      Hey, happy that you like my video. I actually have "ClearType" turned on and I am using a 150% (sometimes 175%) scaling in my "Display" settings. Hope this answers your question! Best, Benny

    • @jefersonlima3524
      @jefersonlima3524 2 ปีที่แล้ว

      @@TypeScriptTV Thanks. It's answered.😁

  • @kwankunghkg
    @kwankunghkg หลายเดือนก่อน

    After exiting WSL, found a memory hungry process "vmmem". Then googled for a while and found ...
    To turn off Vmmem, simply go into Powershell or CMD or whatever terminal you like to use under admin rights, enter the command wsl --shutdown .

  • @sorcererstone3303
    @sorcererstone3303 ปีที่แล้ว

    @5:14, Benny created a folder within the benny's directory for demonstration purpose.
    Can someone tell me where (which directory/folder) most people likely to place their development project in (and can be access through windows explorer and visual studio code)?
    I can create any new directory under Ubuntu directory (@ 4:37).
    Do I have to place all my project folders within one of the pre-existing folders/directories as shown in 4:37?

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Accessing files with WSL/Ubuntu from your Windows drive (example: /mnt/c) will be very slow. When you wish to access files from WSL in VS Code, then I suggest doing that inside your Ubuntu home directory (example: \\wsl.localhost\Ubuntu\home\bennycode\dev). Best, Benny

    • @sorcererstone3303
      @sorcererstone3303 ปีที่แล้ว +1

      @@TypeScriptTV Thank you for the tips.
      When I read MS's docker desktop doc, it too emphasis not to use windows drive for development when using WSL2 for performance issues that you just mentioned.
      So, I am going to place all my projects in this dev directory you suggested. There are going to be a lot of such folders inside this dev directories!!

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      @@sorcererstone3303 great! Do you have a link to the Docker docs to share?

  • @rishiaman2
    @rishiaman2 11 หลายเดือนก่อน

    9:58 i dont have an .ssh directory

  • @joemarcardio525
    @joemarcardio525 ปีที่แล้ว +1

    Thank you sir!

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      My pleasure! 🙂 Greetings from Berlin.

  • @TechIdeasbd
    @TechIdeasbd 2 ปีที่แล้ว +1

    Good job mate.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Thank you very much! I hope my tutorial saves some people from hours of debugging. :D Best, Benny

  • @kritikjain3617
    @kritikjain3617 2 ปีที่แล้ว +2

    Thanks man!

  • @DheerajGudipati
    @DheerajGudipati 3 หลายเดือนก่อน

    Amazing! Thanks benny

  • @aamnakamran6078
    @aamnakamran6078 3 หลายเดือนก่อน +1

    TYSM, it workedddd

  • @runforfun8416
    @runforfun8416 5 หลายเดือนก่อน +1

    thanks,appreciate it

  • @dhairyashiil
    @dhairyashiil 2 หลายเดือนก่อน

    Great Video!!, Thank you.

  • @es7729
    @es7729 ปีที่แล้ว +1

    Thank you!!!

  • @BrazilianDev
    @BrazilianDev 2 ปีที่แล้ว +1

    Very useful.

  • @hazard9064
    @hazard9064 ปีที่แล้ว +1

    thank you so much

  • @rishiaman2
    @rishiaman2 11 หลายเดือนก่อน

    11:28 i dont have nph

  • @xyz-123
    @xyz-123 ปีที่แล้ว

    after installing it is power limiting the cpu while running the codes on windows when iam unplugged to power in my laptop. For this reason my vs code in windows is running at restricted wattage to the cpu hence slowly. What can I do now? Note that there no problem when Iam plugged in.

  • @bulbousdude
    @bulbousdude 2 ปีที่แล้ว +2

    Excellent video! This is exactly what I was looking for. Thank you!

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +2

      I was looking for a good tutorial on WSL 2 myself for a very long time. Happy I could support you with this one! Best, Benny

  • @Zydres_Impaler
    @Zydres_Impaler 7 หลายเดือนก่อน +1

    Thanks a lot bro

  • @supernova-4420
    @supernova-4420 10 หลายเดือนก่อน

    anybody know how to make .code-workspace files open a wsl workspace?

  • @Calypso694
    @Calypso694 10 หลายเดือนก่อน

    can you use man pages with this and other terminal commands like make,cd,ls, etc etc etc.

    • @TypeScriptTV
      @TypeScriptTV  10 หลายเดือนก่อน

      Yes, you will get a complete Ubuntu terminal environment: apps.microsoft.com/detail/9pdxgncfsczv

  • @BilalKas
    @BilalKas 2 ปีที่แล้ว +1

    Danke, brauche fork und pipes für die Uni und mit WSL klappt das mega, wollte keine VPN oder eine richtige VM nutzen..

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      Freut mich, wenn dir das Video helfen konnte! Das WSL ist eine gute Alternative zu Cygwin, MinGW-w64 und anderen Tools. 🙂 Gruß, Benny

  • @Salah-YT
    @Salah-YT 2 ปีที่แล้ว +2

    thank u so much bro because u did help me a lot I did SUB + LIKE for u thank so much

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      That's great! Happy to hear. 🙂🙂🙂

  • @dips_07
    @dips_07 ปีที่แล้ว

    Great video 🤟...one concern is how to auto complete once i type on tab key in wsl terminal..for example want to go to "Home" folder once i type "H" and then click on "tab key" it should be auto complete to "Home"... please help with this

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      I'm afraid that this behavior is only functional in Windows' File Explorer and does not work in a Shell environment. 🤔

    • @dips_07
      @dips_07 ปีที่แล้ว

      Okay 👍

  • @M_SHEHU
    @M_SHEHU 7 หลายเดือนก่อน +1

    Thanks man

    • @TypeScriptTV
      @TypeScriptTV  7 หลายเดือนก่อน

      You are very welcome! 😊

  • @devij230
    @devij230 2 ปีที่แล้ว +3

    Great

  • @miture0502
    @miture0502 2 ปีที่แล้ว

    Hi, is it possible to reopen in container when using vscode plus WSL? When reopening in container, vscode automatically returns to the local machine rather in the Linux environment.

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Good question, does this extension matches your use case? marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers

  • @kirteek5334
    @kirteek5334 2 ปีที่แล้ว

    I watched this video just after I was done installing Ubuntu os 🥲 ... Is WSL will fulfill the requirements that one Linux based project requires.. coz setting up an whole environment in Ubuntu as well. For coding and stuf is again an hectic work I see...

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      WSL is a great option to get up and running with Linux projects on Windows. With Windows 11 you can even run GUI applications. 😲

  • @jimmyolano929
    @jimmyolano929 2 ปีที่แล้ว +4

    2:29 wsl --status

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว +1

      You can use "wsl --status" to check your currently installed WSL version. If no version is found, you can install one using "wsl --install". I added these commands to the description of this tutorial. Best, Benny

  • @muazulislam398
    @muazulislam398 2 ปีที่แล้ว

    I am getting access denied, check permission when I try to open ubuntu/home/username directory

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      Yikes! On which version of Windows are you running? 🪟

  • @iangetwitch
    @iangetwitch 2 ปีที่แล้ว

    great! thank you

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      You are welcome. Happy to help. 🙂 Have a great day! Best, Benny

  • @ІванКобизський-й8ч
    @ІванКобизський-й8ч ปีที่แล้ว +1

    👍

  • @shiroclown6131
    @shiroclown6131 2 ปีที่แล้ว

    Why is vscode shared, but nodejs is not shared?

    • @TypeScriptTV
      @TypeScriptTV  11 หลายเดือนก่อน

      It’s because VS Code is build by Microsoft and they put effort into sharing it with the WSL. Node.js is separate and only lives within the Ubuntu installation.

    • @shiroclown6131
      @shiroclown6131 11 หลายเดือนก่อน

      @@TypeScriptTV wow that is not an expected answer. Thanks.

  • @garimasingh8530
    @garimasingh8530 8 หลายเดือนก่อน

    Thanks a million

  • @xyz-123
    @xyz-123 ปีที่แล้ว

    is it WSL 1 or WSL 2

  • @bluebull399
    @bluebull399 ปีที่แล้ว

    I still struggle to understand what docker desktop actually is or why it's needed.
    I use docker compose on WSL Ubuntu which I use to spin up demons of my app in Ubuntu.
    Can docker desktop do this? I run multiple instances of the app and am always spinning up and down those. A point and click interface would be a lot nicer than typing out Linux commands.

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Docker Desktop is just a GUI on top of Docker. It will allow you to manage your volumes and images. If you're already comfortable using Docker Compose in WSL Ubuntu, it might be more efficient to continue using it though.

  • @Capitan_Mega
    @Capitan_Mega 2 ปีที่แล้ว

    OK but I can't even download anything on my Microsoft store for 1 entire month... Nothing can fix it bruh NOTHING I SEEN 20 VIDEOS of how to fix my Microsoft store and NOTHING

    • @TypeScriptTV
      @TypeScriptTV  2 ปีที่แล้ว

      That's sad to hear but I just found a guide on how to install WSL2 and a Linux distribution without using the Microsoft Store: stackoverflow.com/a/64872285/451634 - Hope it works for you! 🍀🍀

  • @cocogoat1029
    @cocogoat1029 10 หลายเดือนก่อน

    I'm trying to learn assembly as a complete beginner to low level programming and every content creator is using some fancy CLI program while using Linux system calls on their program on their tutorials. I would've been more of a nightmare without AI tools.

  • @MJLee-wl6kt
    @MJLee-wl6kt ปีที่แล้ว

    Is "Remote WSL" now rename to "WSL" ? I can't see "remote WSL" anymore.

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      Probably. Have you tried just using "WSL"?

  • @snarevideos
    @snarevideos ปีที่แล้ว +1

    THANKS A LOT JESUS I LOVE YOU

  • @ninjanape
    @ninjanape ปีที่แล้ว

    I would be able to hear better if the camera was a bit closer to your face

    • @ninjanape
      @ninjanape ปีที่แล้ว +1

      great video though, thanks :D :D

    • @TypeScriptTV
      @TypeScriptTV  ปีที่แล้ว

      @@ninjanape haha, I hope my close-up didn't startle you. I'm using a Sigma 30mm fixed focal length lens, so zooming is a bit limited. Nevertheless, I'm glad you enjoyed the video! 😀

  • @lator1941
    @lator1941 5 หลายเดือนก่อน

    Thanks man

  • @capthat8901
    @capthat8901 11 หลายเดือนก่อน +1

    Thank you!