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
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 :)
Thanks, this is a god send for rails developers which don't use a mac.
you mean send bulk emails like spammers do ?
it is just amazing how linux can run on literally everything
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 :)
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.
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.
the last line tho, for beginners, love you man
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.
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?)
Have you seen Hyper? looks much nicer with really nice theme support. Git Bash is very basic by comparison.
@@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?
Great tutorial as always! It would be awesome if you make a Docker tutorial too
Definitely planning on it
Traversy Media you are awesome
Unti then, this one's long but a pretty good tutorial ua-cam.com/video/1xo-0gCVhTU/v-deo.html
Yaaay, looking forward to the Docker tutorial )
@@TraversyMedia is there a difference between this and a dualboot ubuntu for making android kernel
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.
can confirm.. 2020
Thank you a lot, I was looking for the answer for 3 hours till I've found your clip.
Stop carving for attention man.There are literally thousand of tutorials on UA-cam about this topic
You could have installed ubuntu
Thank you very much. I am a beginner in the programming world and using bash as command line will be helpful :)
I have found after 4 years. Life saver video . Thank you
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.
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.
this is
exactly
what
I
was
looking
for
boom.
hyper, vscode bash git yeah thanks for putting this up
"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.
Awesome I loved this tutorial. I had already installed Ubuntu with Windows 10, but I still learned lots of stuff 👍🙌
Excellent video, very straight forward, I've finally got it installed and working. Thank you very much !
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.
I saw many videos but they were not working..but this 13 minutes video is very worth and helpful...thank you so much
Thanks for re-posting! Much appreciated!
Thank you sooo much!! Watched several videos and 2 hours passed and no one was able to help thank you!
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
thank you :)
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!
Thank you brad for this great tutorial ! I usually use Linux environment, especially Ubuntu distro. So this solution can help a lot !
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?
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.
*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
Thanks, came in here to get something and you gave it straight with no gibberish.
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
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.
Thanks brad sturggling to setup this from a week. now job done by your tutorial. :)
Wow... I actually needed it. Thanks a lot.
i used to use cmder as portable terminal, i gonna git a shot on that hyper
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.
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?
Thank you. I couldn't figure out where to go from the home folder.
Much much informative!!! Thank you👍👍😊✌👍
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 .
I really like it. Thanks so much.
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?
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.
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.
Thank God this exists. I was tired of using PUtty to SSH
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.
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
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!
Been waiting for this. Thanks!
i needed terminal in vs code , thats the reason i stopped using it in windows , thanks for video sir :-)
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 😄
Thanks man 👍, it really really helped me and hope it also help others....!
you are my lord and saviour, you have no idea how much you are helping me
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.
Thank you so much, you are a great help! I was struggling learning this new stuff...
thank you, you are amazing
:)))
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.
Fantastic video! Very helpful and everything perfectly clear! Thank you!
Love this, what a brilliant tutorial, well done man!
Hyped up for Hyper.
as of Windows 10 version 1903 this is now patched 6:47 : you can edit any files through windows apps including vscode
thanks for this info
Thanx for allways making great videos, with a calm and cool teaching process. Once again you saved my day!!! Best regards from Denmark.
You're my HERO for the day...nicely done
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 .
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.
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 !
Your tutorials are great!
Subbed!
WOW! Great video. Thanks. I wanted this features in windows always.
very clear and simple, thank you for your time.
9:46 at this step om my pc th program say "the connection refused" you can help me please ?
did you ever get this resolved? i just got the same issue.
i also have this problem
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/
when i launch "bash" through the command prompt, it launches the Git Bash instead... any ideas on how to replace this?
Very nicely explained
I think this is a ultimate WSL guide with hyper, vscode
Excellent tutorial. Thank you
When launched it shows
Installing, this may take a few minutes...
WslRegisterDistribution failed with error: 0x80080005
Error: 0x80080005 Server execution failed
Who else is watching his videos primarily for entertainment?
me
checkout coding train as well for entertainment.
yeah. i looked on the comments for clues about whats going on but no
Such an awesome demo
Great tutorial very educational good teacher. Can i install java?
Where can we find Hyper terminal? Also, wasn't hyperterminal a dial-up app included in Windows 95 way back when?
Thanks, the instructions is straight and accurate. 👏
Thanks Dude Your Video Help SomeBody After Four Years :)
it's worth watching your video. keep creating such videos ....
I got "ssh: connect to host localhost port 22: Connection refused" on ssh localhost. Any help?
have you solved this problem? If yes, can you share your solution, thanks in advance!
maybe this can help docs.microsoft.com/en-us/windows/wsl/troubleshooting
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.
300mbps :o
Unbelievable right ? 😉
I am getting max 9 Mbps in Microsoft store
I get max 200kbp/s
mine is 975mbps
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
Just wanted to note that you don't need to log in to the Microsoft Store to download the app.
Rea Deimos correct. Free apps don't require a login. Also, you no longer need to enable developer mode to install bash.
Excellent video and good explanation
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?
Hi Traversy Media thanks for great tutorials..Can you record some tutorial about vue.js and weex(vue native for mobile platform)
Sir, how much RAM do you have on your computer?
Oh, back then I don't know. probably 16GB. Now I'm rockin 32GB on the PC and 64GB on the Mac
Bash is showing up , but it is not opening . Any solutions?
Awesome video. I was getting tired of using a vm.
Great tutorial as always! Here is my question, how to change the Linux username in the subsystem? Thank you for your time. 🤝
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
update the windows
How to set visual studio code automatic run command "zsh" when start. Thanks Bro
Please, could you explain the pros and cons by choosing between git-bash or Linux subsystem?
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 :)
Sandra Willford
Good points. Indeed I use just git/node and I'm satisfied with git-bash.
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.
Why don't people just do "sudo apt update && sudo apt upgrade -y" in just one go?
Un tutoriel ce fait, étape par étape
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.
@ 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.
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?
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
it is really helpful, thanks a lot
Nice easy to follow
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.
a video on getting winsshfs for windows10, would be good, so that we can file share with other linux machines