Getting Started with WSL 2 and Ubuntu on Windows 10

Поделиться
HTML-код
  • Опубликовано: 23 июл 2024
  • Getting Started with WSL 2 and Ubuntu on Windows 10. Adam Culp of Beachcasts programming videos shares how to install WSL2, Windows Subsystem for Linux 2 virtualization feature on Windows, and how to add an Ubuntu 20.04 Linux virtual machine using WSL 2. If you've thought of using WSL on Windows, this WSL 2 tutorial will help get you running fast. He will launch Ubuntu on Windows, and show basic commands to customize it.
    Please * LIKE, COMMENT, AND SUBSCRIBE * - and share with others!
    Key Topics:
    - Getting started WSL
    - How to install WSL 2 on Windows 10
    - Set up WSL 2
    - Differences with WSL version 2
    - Basic commands to customize WSL 2
    - Install Ubuntu 20.04 on Windows WSL 2
    - Launching and using Ubuntu in WSL 2 on Windows 10
    For a nice list of equipment I use in my studio, and to support the channel if you make any purchases (doesn't cost you a thing), visit my kit at kit.co: kit.co/beachcasts/beachcasts-...
    Errata:
    Let me know if you notice anything that should be errata
    Associated Links:
    docs.microsoft.com/en-us/wind...
    docs.microsoft.com/en-us/wind...
    docs.microsoft.com/en-us/wind...
    beachcasts.com
    Timeline:
    00:00 Video start
    00:24 Differences between WSL version 1 and version 2
    00:54 How to check Windows version
    02:19 What features to activate in Windows for WSL 2
    03:33 Verify WSL 2 feature activation by listing active virtual machines
    04:25 Set the default version of WSL for system use
    05:15 Set WSL version per instance
    05:58 Install Ubuntu through the Windows Store
    07:01 Installing additional instances of Ubuntu
    07:31 Launching the Ubuntu virtual machine
    07:53 Possible error when installing Ubuntu
    08:44 Set the user and password during Ubuntu installation
    09:26 What can be done with WSL 2 installed Ubuntu
    10:10 Mounts created to host hard drives
    Other Beachcasts videos you might find interesting:
    Setting up a Laravel dev environment using WSL 2 • Developing on Windows ...
    WSL 2 With Docker Getting Started and Docker Desktop Installation • WSL 2 With Docker Gett...
    Conference Talk Preparation In 8 Steps for Programmers • Must Follow 8-Step Gui...
    How to understand code written by someone else • Secrets of how to unde...
    Ways to advance your programming skills and improve as a developer • Ways to advance your p...
    Make your local DEV environment available on the internet • Make your local DEV en...
    AWS Elastic Load Balancer (ELB) Tutorial How-To • AWS Elastic Load Balan...
    Laravel Model Factory Tutorial using Artisan make:model • Laravel Model Factory ...
    Authentication in Laravel Tutorial • Authentication in Lara...
    Top 5 skills to be a better software developer • Top 5 skills to be a b...
    Install Laravel in Docker container on Ubuntu for beginners • Install Laravel in Doc...
    Getters and Setters accessors in object-oriented programming • Getters and Setters ac...
    Critical programming issues preventing a PHP 7 upgrade • Critical programming i...
    Behat for beginners functional REST API testing tutorial • Behat for beginners fu...
    Doctrine ORM one-to-many bi-directional association • Doctrine ORM one-to-ma...
    PHP Mess Detector static analysis to find PHP code smells • PHP Mess Detector stat...
    Doctrine ORM one-to-many self-referencing association • PHP DoctrineORM one-to...
    10 reasons to become a consultant in a consulting business • Top 10 Reasons To Be a...
    Zend Framework becomes Laminas project at Linux Foundation • Zend Framework becomes...
    10 bad things about consulting • Top 10 bad things abou...
    How to get lines of code in PHP • PHPLoc Lines of code s...
    Make a List handler middleware • List handler middlewar...
    Make a Delete handler middleware • Delete handler middlew...
    Make an Update handler middleware • Update handler middlew...
    Use UUID with Doctrine ORM for DB keys • UUID with Doctrine ORM...
    Make a Create handler middleware • Create Handler middlew...
    Automate Hypermedia creation for PHP REST API • Automate Hypermedia PH...
    Learn about Hypermedia and how to create it • Creating Hypermedia (H...
    Doctrine ORM Paginator for PHP REST API • Doctrine ORM Paginator...
    Doctrine ORM Entity how to • Create Doctrine ORM En...
    Configure Doctrine ORM • Configure Doctrine ORM...
    Create PHP middleware with Zend Expressive • Create PHP middleware ...
    Configure PhpStorm for PHP development with Docker • PhpStorm setup for PHP...
    Create PHP development environment with docker • PHP web development en...
    Help through referrals:
    I use TubeBuddy to help me manage my RUclips channel. If you're interested, click the following link to check it out. www.tubebuddy.com/beachcasts
    #wsl2 #subsystemforlinux #beachcasts
  • НаукаНаука

Комментарии • 50

  • @Beachcasts
    @Beachcasts  2 года назад +3

    I look forward to posting more WSL 2 related videos. Likely along the lines of using Docker, and possibly using various IDEs like VSCode or JetBrains. Leave comments for your desires. Check out this playlist for more programming related videos: ruclips.net/p/PL6_nF0awZMoOayYkvnMmpeIjvTJuwTFOo

    • @abhay29
      @abhay29 2 года назад +1

      C++ development with wsl2 and vs code

    • @Beachcasts
      @Beachcasts  2 года назад +1

      @@abhay29 Maybe some day. At the moment I have zero C++ experience.

    • @abhay29
      @abhay29 2 года назад

      @@Beachcasts ok np

    • @Beachcasts
      @Beachcasts  2 года назад +1

      @@abhay29 Despite that, I hope you find some helpful content in my channel. Thanks for watching.

    • @Lucy-hk4fn
      @Lucy-hk4fn 2 года назад

      Would love to see using Python + PyCharm on WSL2 if possible :)

  • @Lucy-hk4fn
    @Lucy-hk4fn 2 года назад +1

    Thank you so much for this video - it was so helpful that you put the steps into context for a newbie like me, but also managed to make the video concise still! Thank you :)

    • @Beachcasts
      @Beachcasts  2 года назад +1

      Thank you for watching, and very glad it helped.

  • @EliasHasan_
    @EliasHasan_ 8 месяцев назад +1

    It is the simplest and easiest way to set up. Thanks uncle! Take lots of wishes from beautiful Bangladesh.

  • @jz7615
    @jz7615 Год назад

    Easy to understand, thank you!

  • @ObsidianMercian
    @ObsidianMercian 2 года назад

    Brilliant informative video, thank you. Glad to have found your channel and now subscribed.

  • @ianmichel5720
    @ianmichel5720 3 месяца назад

    Great video!

  • @jw4659
    @jw4659 2 года назад

    This worked nicely.

  • @AlbrechtJ
    @AlbrechtJ 2 года назад

    Thanks for a good tutorial.

    • @Beachcasts
      @Beachcasts  2 года назад

      Thank you for watching, glad it helped.

  • @HeinserTorres
    @HeinserTorres 2 года назад +1

    Great video Keep it up!

  • @deblua1674
    @deblua1674 2 года назад

    Excelent my friend, thx

  • @isragaytanmistico
    @isragaytanmistico 2 года назад

    Thanks a lot!. God Bless You

    • @Beachcasts
      @Beachcasts  Год назад

      Glad you enjoyed it, and found it helpful.

  • @davidschroeder2732
    @davidschroeder2732 2 года назад +1

    Check to determine if vitalization is enabled by going to the Performance Tab in Task Manager, Virtualization status (enabled or not) is displayed below CPU % Utilization graphic

    • @Beachcasts
      @Beachcasts  2 года назад

      Very nice tip. Thanks for that.

  • @nicolasbotellomendoza6050
    @nicolasbotellomendoza6050 2 года назад

    someone told me to check in the windows features the box: "window hypervisor platform" and I did, but I see the professor that just check the: virtual machine platform and windows subsystem for Linux, so my question is: should I deactivate the window hypervisor platform feature?

    • @Beachcasts
      @Beachcasts  2 года назад +2

      I think it's ok to leave it checked. Especially if you intend to run VirtualBox or VMware and WSL2 at the same time.

  • @sheruloves9190
    @sheruloves9190 2 года назад

    Thanks...

    • @Beachcasts
      @Beachcasts  2 года назад

      You are very welcome. Thank you for watching.

  • @user-mfsc-2024
    @user-mfsc-2024 2 года назад

    hyper-v window feature is not a must to run WSL ?
    ive watched many videos all enable hyper-v to use wsl

    • @Beachcasts
      @Beachcasts  2 года назад +1

      No. Hyper-v is old news, and too slow.

  • @iamshivaagrawal
    @iamshivaagrawal 2 года назад

    How can I use Gedit ?
    no X servers are wroking for me

    • @Beachcasts
      @Beachcasts  2 года назад

      Thanks for the great question. I've not used x on servers, And therefore, have also not used it in dev environments. Sorry, not able to provide any answer.

  • @holdenjack
    @holdenjack 2 года назад +1

    Hi I see you installed Ubuntu 20.04 LTS and 18.04 LTS, any particular reason for not installing just "Ubuntu". Thanks so much

    • @Beachcasts
      @Beachcasts  2 года назад +2

      Thanks for the question. At the moment, installing "Unbuntu" provides 20.04 LTS. Which means, if I destroy it and reinstall it in the future, it might contain a different version than expected. By specifying the version, I can be sure what I'm getting. Especially as it relates to versions of specific software included, like PHP or Python.

    • @holdenjack
      @holdenjack 2 года назад +1

      @@Beachcasts Thanks for your quick response! Clarified it perfectly. I'm on Windows 11 and by entering "wsl --install" it did the entire installation in one go and automatically installed "Ubuntu" which is 20.04 but i'll unregister that and reinstall a specified version. Thanks so much!!!!!

    • @Beachcasts
      @Beachcasts  2 года назад +2

      @@holdenjack Yes, I noticed Windows 11 makes it's even easier. Future video opportunity. ;-)

  • @bluex217
    @bluex217 2 года назад

    Unfortunately when running Ubuntu - "WslRegisterDistribution failed with error: 0x80041002" every time after 3 days of attempted rectification.. The ONLY thing that has worked is downgrading wsl version from 2 to 1, but I need 2 to run Docker

    • @Beachcasts
      @Beachcasts  2 года назад +1

      Sorry to hear about the issues. I've not experienced that, and not sure how to duplicate.

    • @lardosian
      @lardosian 2 года назад +1

      Sounds like your virtualization is not enabled in your Bios.

    • @bluex217
      @bluex217 2 года назад +1

      Thanks everyone. I still have no idea what the details of problem were; but I know it pertained to virtualization. The only thing that worked was reinstalling Windows. I spent over a week and 1/2 ensuring that everything for virtualization was turned on both in BIOS and windows features. I'd tried running Docker with both Hyper-V as well as WSL w/ and w/out a distribution such as Ubuntu. After Windows reinstallation, same settings using WSL w/out a distribution and Docker starts fine every time now

    • @lardosian
      @lardosian 2 года назад +1

      @@bluex217 Computers can be very frustrating when things dont work!!!

  • @scheidegg
    @scheidegg 2 года назад +1

    Docker with WSL2 is extremely slow. On dockerized symfony every request goes 7-10 seconds. WSL1 takes 300ms - 1s.

    • @Beachcasts
      @Beachcasts  2 года назад +1

      Thanks for sharing. I've not experienced those extremes.

    • @dickwans
      @dickwans 2 года назад

      Where are the source files located oin your Symfony project? In my setup, I source code always in the WSL 2

    • @Beachcasts
      @Beachcasts  2 года назад

      @@dickwans I typically keep the source on the host, and symbolic link it in the VM by using /mnt mounts.

    • @Tux0xFF
      @Tux0xFF 2 года назад +1

      Same here, WSL requests were faster than WLS2, i think docker runs as it should in mac or linux only.
      Windows is still the worst platform to develop PHP applications. But there is also Homestead/Vagrant when i dont want to waste a day trying to fix performance, it even works ok in Windows

  • @johnmcgiv1
    @johnmcgiv1 2 года назад

    hi unfortunately your video has audio but is showing black screen playback.

    • @Beachcasts
      @Beachcasts  2 года назад

      Sorry. Seems OK now. Must have been a temporary issue for either RUclips or your system. Please try again.