Windows 10 Bash & Linux Subsystem Setup

Поділитися
Вставка
  • Опубліковано 18 вер 2024
  • In this video we will setup the Windows Subsystem for Linux with Ubuntu and bash terminal on Windows 10. This will allow us to use Unix based tools from within Windows. We will also integrate with VScode and the Hyper terminal.
    💖 BECOME A PATRON: Show support & get perks!
    / traversymedia
    VISIT MY WEBISTE: Check Out My Udemy Courses
    www.traversymed...
    FOLLOW TRAVERSY MEDIA:
    / traversymedia
    / traversymedia
    / traversymedia
    / discord

КОМЕНТАРІ • 540

  • @francoisbourvil8733
    @francoisbourvil8733 5 років тому +49

    Whenever I look for a video on a new technology, I always come across a video of Travery Media very well explained.
    Awesome Brad !
    Thank you very much for your time :)

  • @anonymouse7074
    @anonymouse7074 6 років тому +67

    Thanks, this is a god send for rails developers which don't use a mac.

  • @Jeancahu
    @Jeancahu 3 роки тому +16

    it is just amazing how linux can run on literally everything

  • @danielandreasen2293
    @danielandreasen2293 6 років тому +3

    I just moved from research (on linux) to an IT job (on windows) and this is a life saver! So happy that Windows are embracing linux. Great video as always :)

  • @razt3757
    @razt3757 5 років тому +5

    Just a quick tip: This actually has a system call interface between the host and the guest.
    This means that the distro actually has linux systems calls like fork.
    This is very useful for languages that don't support multithreading like php.
    You can use php's pcntl_fork to create forks instead of threads.
    You wouldn't be able to use pcntl_fork on the bare windows system because microsoft doesn't actually offer a fork system call.
    It's a lifesaver for testing php-cli software that uses systemcalls on windows.

  • @pandehigos
    @pandehigos 6 років тому +2

    Man I'm just starting in web development and every time I look for something I need to learn or investigate, there you are explaining it. I'm following your JavaScript tutorials and udemy course, will go to coding bootcamp next January and you're in part responsible for it. Thank you.

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

    the last line tho, for beginners, love you man

  • @RiiiadDesign
    @RiiiadDesign 6 років тому +1

    I am using a Vagrant setup on my Windows. It's working pretty well for my PHP env. But nice to know that you can use bash on Win10. I think also that most of the beginner developers fail at finding and setting up local environments.

  • @indieNik
    @indieNik 6 років тому +36

    Thank you for introducing me to Hyper. Sounds pretty cool! :D
    (Edit: Waiting for Hyper's Video. What I want to know is why do you prefer Hyper over Git Bash?)

    • @techtipsuk
      @techtipsuk 6 років тому +3

      Have you seen Hyper? looks much nicer with really nice theme support. Git Bash is very basic by comparison.

    • @belcan65
      @belcan65 5 років тому

      @@nyarukooo You are so smart!!
      You can learn everything yourself!!!
      I'm just wondering what are you doing here, watching this video? Why don't you just learn it yourself?

  • @matiasolivera8909
    @matiasolivera8909 6 років тому +41

    Great tutorial as always! It would be awesome if you make a Docker tutorial too

    • @TraversyMedia
      @TraversyMedia  6 років тому +9

      Definitely planning on it

    • @matiasolivera8909
      @matiasolivera8909 6 років тому

      Traversy Media you are awesome

    • @joshuahewlett44
      @joshuahewlett44 6 років тому

      Unti then, this one's long but a pretty good tutorial ua-cam.com/video/1xo-0gCVhTU/v-deo.html

    • @madferit1987
      @madferit1987 6 років тому

      Yaaay, looking forward to the Docker tutorial )

    • @ableh7489
      @ableh7489 4 роки тому

      @@TraversyMedia is there a difference between this and a dualboot ubuntu for making android kernel

  • @TheHornet79
    @TheHornet79 5 років тому +15

    I am typing this in June 2019. You do not need to be under developer mode as you can download the ubunta bash on the windows store.

  • @entertainmentguy4509
    @entertainmentguy4509 4 роки тому +7

    Thank you a lot, I was looking for the answer for 3 hours till I've found your clip.

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

      Stop carving for attention man.There are literally thousand of tutorials on UA-cam about this topic

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

      You could have installed ubuntu

  • @MrMeriojajaja
    @MrMeriojajaja 4 роки тому +1

    Thank you very much. I am a beginner in the programming world and using bash as command line will be helpful :)

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

    I have found after 4 years. Life saver video . Thank you

  • @fuhrmanator00
    @fuhrmanator00 6 років тому +1

    Thanks for showing the integration with VSCode and other stuff. This is very cool! I have been using Git bash quite a lot (even in VSCode, with Node, etc.), but found out the MINGW perl is borked (can't install anything), so I"m happy to find this solution.

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

    You nailed my professor's lesson on a tutorial in the environment setup in 10 mins..lol Most of my classmates don't even get to the setup after following the words. I really hope the teachers/even some professors know what the heck they are doing on teaching students.

  •  5 років тому +7

    this is
    exactly
    what
    I
    was
    looking
    for
    boom.
    hyper, vscode bash git yeah thanks for putting this up

  • @Glycenide
    @Glycenide 6 років тому

    "Confuse the absolute shit out of them" Coffee came out of nose from laughter after hearing that as I am a system admin and have to be careful of not doing this when explaining computer stuff to my co-workers. I do get carried away sometimes because it's just way to fun.

  • @petecapecod
    @petecapecod 6 років тому +2

    Awesome I loved this tutorial. I had already installed Ubuntu with Windows 10, but I still learned lots of stuff 👍🙌

  • @CDescardeci
    @CDescardeci 5 років тому +2

    Excellent video, very straight forward, I've finally got it installed and working. Thank you very much !

  • @emresert8044
    @emresert8044 5 років тому

    i think this video is very useful for students like me . if you want to compile c codes with 'gcc' , as a last step you must write 'sudo apt install gcc' after opening bash.

  • @rajashreeshanmugam2552
    @rajashreeshanmugam2552 4 роки тому

    I saw many videos but they were not working..but this 13 minutes video is very worth and helpful...thank you so much

  • @scriptskillz
    @scriptskillz 6 років тому +1

    Thanks for re-posting! Much appreciated!

  • @cheddar265
    @cheddar265 4 роки тому

    Thank you sooo much!! Watched several videos and 2 hours passed and no one was able to help thank you!

  • @valentim-aires
    @valentim-aires 5 років тому +1

    For those who don't have the 'Windows subsystem for Linux' option:
    . Open the PowerShell as Admin, then:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    . Reboot your pc

    • @emil4483
      @emil4483 5 років тому

      thank you :)

  • @xl_Tacticool_SF
    @xl_Tacticool_SF 6 років тому

    Vids keep getting better Brad! Been trying to figure out if I want to dual boot or just use Linux. This video just solved that problem!

  • @mamadoundiade2764
    @mamadoundiade2764 6 років тому +7

    Thank you brad for this great tutorial ! I usually use Linux environment, especially Ubuntu distro. So this solution can help a lot !

  • @nmqb13
    @nmqb13 6 років тому +1

    IMMENSELY HELPFUL!! Thanks for this. I'll probably be looking at your other videos shortly. Are you planning on doing anything specific with ruby on rails in this Windows 10 linux subsystem?

  • @munternet8971
    @munternet8971 4 роки тому +1

    Way to break it down. Well done!! I might even have a serious go at using linux now :) Not a time waster like many youtubers.

  • @TheOrtegaProject
    @TheOrtegaProject 4 роки тому

    *06:22* Straight down is pretty much obvious on Linux Terminal, just make sure to get the exact case right (Case-Sensitive). Also, for terms with spaces, especially with directories...quotation marks may be required (also works in CMD and PowerShell).
    --Emm

  • @ameensams
    @ameensams 4 роки тому

    Thanks, came in here to get something and you gave it straight with no gibberish.

  • @SalemGTV
    @SalemGTV 5 років тому

    It's funny that I ran into this AFTER downloading a VM because I couldn't find out how to access mnt within the standard ubuntu prompt. Well, at least I Learned a lot more about Linux!
    Sick videos Brad

  • @mobi8138
    @mobi8138 6 років тому +1

    Nice tutorial.. I didnt know windows could do this.. After reading up on it more it turns out you dont need to use Developer mode.

  • @agassijoel3343
    @agassijoel3343 6 років тому +1

    Thanks brad sturggling to setup this from a week. now job done by your tutorial. :)

  • @reristavi
    @reristavi 6 років тому +1

    Wow... I actually needed it. Thanks a lot.

  • @diegovinicius4186
    @diegovinicius4186 4 роки тому

    i used to use cmder as portable terminal, i gonna git a shot on that hyper

  • @PhanorColl
    @PhanorColl 4 роки тому

    Actually, you can use VSCode installed on Windows and edit files from the Linux distro without issues, you can start VSCode from the project's directory using 'code .' and you're ready to code.

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

    I have 2 Hard Drives, C (the one with windows) and D, when I do "sudo apt install stuff" where is "stuff" installed? How can I change the installation location?

  • @gcooper642
    @gcooper642 4 роки тому

    Thank you. I couldn't figure out where to go from the home folder.

  • @travelspurs
    @travelspurs 6 років тому +3

    Much much informative!!! Thank you👍👍😊✌👍

  • @jagannathgaidhani5333
    @jagannathgaidhani5333 6 років тому

    hey dude i just love and understand the way u delivers quality contain through your youtube channel. As viewers i would be glad if u make a one video about the how the big site get made and please explain one particular website that how things get placed while developing the website means what tools we can use for particular stuff in website like angular js for single page application. In short decode one particular website and explain how all elements has been placed what tools they used .

  • @MULTICODE
    @MULTICODE 6 років тому +2

    I really like it. Thanks so much.

  • @ArturOrysz
    @ArturOrysz 6 років тому +2

    Thank you for the great movie, could you explain to me more exactly how to configure node.js and commposer or GIT. Should I install a version of these programs for Windows or for linux inside Linuxsubsystem ? I want to install Laravel inside Docker for Windows. For this I need to run a composser. How to combine it all together?

  • @TimothyCareyDV
    @TimothyCareyDV 6 років тому +3

    Which version of ubuntu should I install from the windows store? There are three 18.04 Or 16.04 Or ubuntu Without a number after it.

    • @Damienov
      @Damienov 6 років тому +2

      Both are LTS version (Long Term Service). it will be supported for 5 years after release. So for 16.04, released on April 2016 (thus named 16.04), it will have support until April 2021. So if you wanted a longer support time, choose 18.04 which will have support up to April 2023.

  • @killabyt3
    @killabyt3 5 років тому

    Thank God this exists. I was tired of using PUtty to SSH

  • @nobytes2
    @nobytes2 5 років тому

    I am not entirely sure what you mean by data corruption, a text file is a text file in any OS. I want to say even Microsoft opened files in vscode in the showcase of WSL2.

  • @rohit_ambre
    @rohit_ambre 5 років тому +1

    hey, I have one doubt before I make move to WSL, as you have mentioned not to update linux home files from windows tool then how to setup httpd files which are stored in /var/www/html folder inside linux so how to edit those files
    Please explain

  • @drewerving7428
    @drewerving7428 6 років тому +1

    Are you from the east coast? btw thanks for always making amazing videos and your lack of opinion and straight forward talk could not be more professional! I would pay to watch your videos sir. thank you!

  • @Adam-eats
    @Adam-eats 6 років тому

    Been waiting for this. Thanks!

  • @shoebmoin10
    @shoebmoin10 6 років тому +1

    i needed terminal in vs code , thats the reason i stopped using it in windows , thanks for video sir :-)

  • @Luxcium
    @Luxcium 4 роки тому

    Will you be doing something for the intermediate and advanced people that are watching your videos 😄 I love your videos and I would love it if you did sometimes advanced topics and intermediate topics like this one 😄

  • @vipullokhande8286
    @vipullokhande8286 4 роки тому +1

    Thanks man 👍, it really really helped me and hope it also help others....!

  • @AngelOfDeath943
    @AngelOfDeath943 4 роки тому

    you are my lord and saviour, you have no idea how much you are helping me

  • @NoahNobody
    @NoahNobody 6 років тому +1

    No idea if this will work, but
    echo "alias c='cd /mnt'" >> ~/.bashrc
    might be a good shortcut to get you into the c drive.

  • @visitor5914
    @visitor5914 5 років тому +1

    Thank you so much, you are a great help! I was struggling learning this new stuff...
    thank you, you are amazing
    :)))

  • @NguyenNguyen-tc6gb
    @NguyenNguyen-tc6gb 5 років тому

    it's actually helpful. I got tons of problems when trying to install real Ubuntu for my system. This saves me probably. Bwt, thank you so much for this video.

  • @vladi1475S
    @vladi1475S 5 років тому

    Fantastic video! Very helpful and everything perfectly clear! Thank you!

  • @cervantes01
    @cervantes01 6 років тому

    Love this, what a brilliant tutorial, well done man!

  • @lemonplz
    @lemonplz 6 років тому

    Hyped up for Hyper.

  • @illiablood3453
    @illiablood3453 4 роки тому +1

    as of Windows 10 version 1903 this is now patched 6:47 : you can edit any files through windows apps including vscode

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

    Thanx for allways making great videos, with a calm and cool teaching process. Once again you saved my day!!! Best regards from Denmark.

  • @gojoe36
    @gojoe36 6 років тому

    You're my HERO for the day...nicely done

  • @MrMisakable
    @MrMisakable 5 років тому

    opening linux files will not cause data corruption, it will just save it with different endline . in linux you can try dos2unix on that file afterwards to get the endline sign corrected .

    • @badpants
      @badpants 5 років тому

      You can set in the Visual Studio Code preferences what EOL you want to use. When editing a file, the type of EOL used in the file is displayed in the status bar. You can click on that in the status bar and change it for a file. MS development tools, like Visual Studio and associated build tools, don't care what type of EOL is used, they work with both just fine.

  • @filipkovac767
    @filipkovac767 6 років тому

    hey brad ! you should also tell them what they can do !
    If you create files on Windows: you can work with them on both Linux as well as Windows
    If you create files on Linux: you can only work with them on Linux !

  • @Polarwhite43
    @Polarwhite43 5 років тому

    Your tutorials are great!
    Subbed!

  • @rinatvaliullov3247
    @rinatvaliullov3247 6 років тому

    WOW! Great video. Thanks. I wanted this features in windows always.

  • @speshuLcs
    @speshuLcs 5 років тому

    very clear and simple, thank you for your time.

  • @mbakopdimitri3610
    @mbakopdimitri3610 5 років тому +6

    9:46 at this step om my pc th program say "the connection refused" you can help me please ?

    • @nn-hs6ho
      @nn-hs6ho 4 роки тому

      did you ever get this resolved? i just got the same issue.

    • @Farhan7
      @Farhan7 4 роки тому

      i also have this problem

    • @shubhgaur
      @shubhgaur 4 роки тому +1

      You'll have to set up SSH server on WSL. Here's an article - www.illuminiastudios.com/dev-diaries/ssh-on-windows-subsystem-for-linux/

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

    when i launch "bash" through the command prompt, it launches the Git Bash instead... any ideas on how to replace this?

  • @elliottharris4526
    @elliottharris4526 5 років тому

    Very nicely explained

  • @bodguy1035
    @bodguy1035 5 років тому

    I think this is a ultimate WSL guide with hyper, vscode

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

    Excellent tutorial. Thank you

  • @rohitrathor6160
    @rohitrathor6160 4 роки тому

    When launched it shows
    Installing, this may take a few minutes...
    WslRegisterDistribution failed with error: 0x80080005
    Error: 0x80080005 Server execution failed

  • @eldanx
    @eldanx 6 років тому +44

    Who else is watching his videos primarily for entertainment?

    • @rz2374
      @rz2374 6 років тому

      me

    • @blasttrash
      @blasttrash 5 років тому +1

      checkout coding train as well for entertainment.

    • @corlfranco9371
      @corlfranco9371 5 років тому

      yeah. i looked on the comments for clues about whats going on but no

  • @MuhammadAhmed-wh5kv
    @MuhammadAhmed-wh5kv 6 років тому

    Such an awesome demo

  • @flipinfin
    @flipinfin 4 роки тому

    Great tutorial very educational good teacher. Can i install java?

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

    Where can we find Hyper terminal? Also, wasn't hyperterminal a dial-up app included in Windows 95 way back when?

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

    Thanks, the instructions is straight and accurate. 👏

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

    Thanks Dude Your Video Help SomeBody After Four Years :)

  • @guptaramkumar52
    @guptaramkumar52 4 роки тому

    it's worth watching your video. keep creating such videos ....

  • @bantzrayder8976
    @bantzrayder8976 5 років тому +2

    I got "ssh: connect to host localhost port 22: Connection refused" on ssh localhost. Any help?

    • @hieuminh2812
      @hieuminh2812 5 років тому

      have you solved this problem? If yes, can you share your solution, thanks in advance!

    • @amineneifer9968
      @amineneifer9968 4 роки тому

      maybe this can help docs.microsoft.com/en-us/windows/wsl/troubleshooting

  • @cre8vedesign
    @cre8vedesign 4 роки тому

    I wish you would of explained it more in this regards. As a new person to command line I am having a hard time figuring out the difference between git bash, powershell, cygwin, ubuntu (from market place) etc. I am mainly using this for web developement and managing files.

  • @samara882
    @samara882 6 років тому +157

    300mbps :o

    • @prithvishbaidya1119
      @prithvishbaidya1119 6 років тому +11

      Unbelievable right ? 😉

    • @bheemboyharish3263
      @bheemboyharish3263 5 років тому +5

      I am getting max 9 Mbps in Microsoft store

    • @TotalLegitimate
      @TotalLegitimate 5 років тому +13

      I get max 200kbp/s

    • @lvl3472
      @lvl3472 5 років тому +6

      mine is 975mbps

    • @leocurious9919
      @leocurious9919 5 років тому +4

      1. Its a big M for mega, not a m for milli
      2. Its a little convention to use b for bit and B for Byte
      So its 300 MBps or 300 MB/s or 300 Megabyte/s

  • @micolashcage
    @micolashcage 6 років тому +2

    Just wanted to note that you don't need to log in to the Microsoft Store to download the app.

    • @NazmusLabs
      @NazmusLabs 6 років тому +1

      Rea Deimos correct. Free apps don't require a login. Also, you no longer need to enable developer mode to install bash.

  • @parthpatel8051
    @parthpatel8051 5 років тому

    Excellent video and good explanation

  • @shakibraheel
    @shakibraheel 4 роки тому +1

    Thanks man it helped a lot! another help is needed, how to recover the password?
    ssh: connect to host localhost port 22: Connection refused ; what can I do about it?

  • @vardgeskeshishyan380
    @vardgeskeshishyan380 6 років тому +1

    Hi Traversy Media thanks for great tutorials..Can you record some tutorial about vue.js and weex(vue native for mobile platform)

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

    Sir, how much RAM do you have on your computer?

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

      Oh, back then I don't know. probably 16GB. Now I'm rockin 32GB on the PC and 64GB on the Mac

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

    Bash is showing up , but it is not opening . Any solutions?

  • @Bryan-zo6ng
    @Bryan-zo6ng 6 років тому

    Awesome video. I was getting tired of using a vm.

  • @hp8246
    @hp8246 6 років тому

    Great tutorial as always! Here is my question, how to change the Linux username in the subsystem? Thank you for your time. 🤝

  • @siamnoor9848
    @siamnoor9848 6 років тому +1

    hey in my laptop i did not find the Windows subsystem feature for linux in program and features on off options.My laptop in Developer mode..how i fix this problem now

  • @nguyenquangtuyen3389
    @nguyenquangtuyen3389 4 роки тому +1

    How to set visual studio code automatic run command "zsh" when start. Thanks Bro

  • @MrEldari
    @MrEldari 6 років тому +1

    Please, could you explain the pros and cons by choosing between git-bash or Linux subsystem?

    • @tendesign17801
      @tendesign17801 6 років тому

      I think it really comes down to the extent of what you need to use bash for. If you are using it for simple things like git commands, node/npm and thing like that etc... Then git-bash or command/powershell are probably fine for you.
      I started using the WLS way back when it was only available on the Insiders fast ring. It solved a lot of problems for me. Mainly having to use putty any time I needed to ssh somewhere, but also it allowed me to run a full production environment on my windows machine that was tied to my local file system. For a bulk of my projects I host them on a LAMP server, so I am able to replicate that locally without having to SFTP edit my files.
      I do have some projects where the backend team is building in python, java etc... Setting up virtual environments is just so much easier in a pure linux environment.
      So I guess my point is, it really depends on what your demands are. The pros and cons are very individual. Of course if you are a Mac user, this whole discussion is mute :)

    • @MrEldari
      @MrEldari 6 років тому

      Sandra Willford
      Good points. Indeed I use just git/node and I'm satisfied with git-bash.

    • @katrinabryce
      @katrinabryce 6 років тому

      Eliandro Daniel Ribeiro
      With linux subsystem, you can run pretty much anything that runs on linux. Samba doesn’t work as it interferes with the Windows equivalent, so you mount drives on Windows and access via /mnt/[driveletter] , and some x based progs don’t work very well.

  • @KirbyPwnz13
    @KirbyPwnz13 6 років тому +4

    Why don't people just do "sudo apt update && sudo apt upgrade -y" in just one go?

    • @edmondamedee7918
      @edmondamedee7918 5 років тому +1

      Un tutoriel ce fait, étape par étape

    •  5 років тому

      yeah i hear you . but out of curisosity. whats the diference ? and why the hell do you need to udpate when you just installed it.

    • @mythos5202
      @mythos5202 5 років тому

      @ I know I'm 3 months late here, but "apt update" updates your list of available packages and their latest versions. "apt upgrade" upgrades the packages you've installed.

  • @kevyyar
    @kevyyar 5 років тому +1

    so by installing this on our windows system, can we actually create folders, files, edit files, open files with our favorite editors just as if we were using the linux terminal?

    • @tushargoyaliit
      @tushargoyaliit 5 років тому

      actually yes , but i am not been able to do .Can u help if u r done with that. Mine ase ls does not give any results although ls -a gives some files . .. .bash_history .bash_logout .bashrc .profile .sudo_as_admin_successful can u plwase help me

  • @sundarshrestha6530
    @sundarshrestha6530 5 років тому +1

    it is really helpful, thanks a lot

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

    Nice easy to follow

  • @YoutubeDashJ
    @YoutubeDashJ 5 років тому +1

    I am not able to find user name after the command of /mnt/c/Users.."_"( I can find only ACER 'ALL USERS' Default 'Default user's public desktop.ini)
    kindly help me to install it in my windows 10.

  • @Areyes2127
    @Areyes2127 6 років тому

    a video on getting winsshfs for windows10, would be good, so that we can file share with other linux machines