Transcript from the "How to Run Linux" Lesson
>> This has been a lot of talking. I mean, we're a decent amount into this course we have not done anything yet, so let's do something. So I have to kinda give you disparate instructions depending on what your operating system is. You can see here I have my Mac running.
[00:00:16] So I'll be showing you obviously all this stuff from a Mac, but this should also work for Windows and this will also work for Linux. So I'll just say, if you're already running a Linux computer, congratulations, you're already finished. You can use Linux on Linux, right? I don't think that's much of a secret to anybody.
[00:00:35] But if you're on macOS or if you're on Windows, you're gonna have to do some extra steps here. So we're gonna go through something called virtualization. You've probably heard the abbreviation of VM before, so we're gonna set up a Linux VM on your computer. And a VM is just an operating system running within another operating system.
[00:00:55] So you basically have a host machine, which will be my Mac, right? And it's basically going to create a virtual computer inside of it that I'm going to access through my Mac. That process is called virtualization. And that VM must can have access to any like real hardware.
[00:01:09] Basically, your host computer is going to fake access to memory, access to all that kinda stuff, and it's going to give that access to the guest machine, the VM that's running inside of it. So at this point, we're gonna get your VM up and running. So I'm gonna give you a couple options.
[00:01:27] The one that I'm gonna suggest to you is one called Multipass. So if you go to multipass.run, like that, you'll end up on this website. This is from Canonical. You can see up here, this is actually an official project from Canonical, and it's just a mini VM runner for Ubuntu on your computer.
[00:01:51] It's super easy to get up and running with. So if you go back to my page here, not that one, this one. So I gave you instructions here for Windows 10, and instructions for macOS. So just go ahead and click on this, and go through this, and I'm gonna leave that so that you follow their instructions, cuz they'll keep this up to date for you.
[00:02:17] But for Mac, it's really as easy, it's just downloading something off of GitHub, installing it, and then you'll get this little orange thing that you can see up here in my toolbar. That's what Multipass is, and it's relatively the same process for, oops, let's go back here, it's relatively the same process for Windows 10.
[00:02:38] The one thing that I want to call out, if you are on Windows 10 Home, you have to install VirtualBox, okay? If you're on Windows 10 Professional or Education or Enterprise, you don't need to do anything else, you just need to install Windows 10, so you need to just install Multipass and you're good to go.
[00:02:56] But if you're on Windows 10 Home, you have to install one more tool, which will be VirtualBox, which I have down here as well. So I'm just gonna reemphasize that cuz I know people are gonna ask me later, if you have Windows 10 Home, be sure you install VirtualBox.
[00:03:17] Okay, so once you go through that, it'll give you this little thing up here, and you can open the shell. So if I just click Open Shell here, you can see immediately it drops me into Ubuntu. And for macOS, you just install it and it should work. So the other option I do wanna give you, you can just use VirtualBox directly whether you're on Mac OS or Windows or Linux, VirtualBox works on all three of them.
[00:03:45] It's a project from Oracle that allows you to run VMs whenever you want. It's just a little bit more process to get that up and running because you have to install the installer as well. So I'm going to suggest everyone use Multipass. So, and I did leave some instructions here if you want to go through and do VirtualBox, I'm not gonna again walk through them, but at the end of it, if you do VirtualBox, it will look like this.
[00:04:21] And then lastly for just Windows 10 users, you can do WSL, and I left some instructions there. WSL allows you to run a Linux kernel within Windows, I'm not gonna get too much into that. If you wanna go down that pathway, that's actually what I do on my personal laptop, is used WSL, but that's not available to everyone.
[00:04:47] So does anyone have any questions or concerns about installing Multipass? That's really what I think you should do, unless you have a strong opinion that you should do something else.
>> Can you use Windows Subsystem for Linux?
>> Yep, actually, that was the last thing I was talking about here for WSL users right here.
[00:05:08] So Windows Subsystem for Linux is WSL and I left the doc here for getting it up and running on Windows. I would definitely suggest getting WSL2 if you wanna on WSL. As of Windows Update 2004, which most Windows computers should be on now, you can get WSL2 whether you have Home or Pro versions of Windows.
[00:05:39] If you're on older, like 1906, you have to be on WSL1, or sorry, [COUGH] excuse me, yeah, only WSL1 will work. So anyway, yes, WSL will work great for this course.
>> Is virtualization and emulation, is that the same?
>> You know, I don't actually really know the difference between those two things.
[00:06:05] I think emulation is you're emulating specific hardware, like when I hear emulators, I think of emulating video game ROMs, right, where you have your computer pretending to be different hardware than it is. Whereas I think virtualization is actually just creating subsets of resources and giving a guest machine access to those resources.
[00:06:28] So it's not like you're really emulating anything of sorts. In fact, you're not, right? Everything is still the same instruction set, whereas emulation, you're actually changing instructions on the fly to try and pretend to be something else. But you might wanna check me on that, that's just me pulling stuff out of somewhere.
>> Do you know the main difference between WSL 1.0 and WSL 2.0?
>> I do, WSL2 is actually virtualized. So it's a it's a real VM, it runs on Microsoft Hyper-V, whereas WSL1 was doing a translation basically, it was more like an emulation, I suppose. So it was a lot slower, in particular when it had to do cross, when talking from Windows to Linux and Linux back, it was super, super slow, whereas Hypervisor is quite fast.
[00:07:25] So suffice to say, they basically read totally redid WSL from the ground up from WSL1 to WSL2, and it's just 100 times faster. I don't think I'm even exaggerating. I think it's actually over 100 times faster. The virtual file system in WSL1 was so slow that when you did NPM installs inside of WSL, it would take minutes just because of the file IO between back and forth of writing files.
[00:07:51] And now NPM install on WSL can sometimes be faster than natively running Linux.
>> And there's quite a few people asking about if they can just continue on with bash if they have Mac rather than virtualizing Linux
>> Wouldn't suggest it. You're certainly gonna run into some differences, because they are, like I said, different things.
[00:08:18] So I would suggest getting into Multipass and running Linux. You don't have to, I mean, it will mostly work, but part of the point of this course is also to learn a little bit of Linux as well.