Complete Intro to Linux and the Command-Line APT Q&A
Transcript from the "APT Q&A" Lesson
>> So yeah, I guess one last kinda like wrap up sort of thing that I want to say, is APT is actually several tools combined together. And so like it's apt get, its apt remove, its apt update. So they kind of took all of those various different tools, and they wrote APT which is a higher tool on top of all these like lower level tools.
[00:00:21] So under the hood, apt is using apt get, and it's using apt search, and apt cache, and a bunch of these other tools. So you can actually use those tools directly as well, it's just apt is meant to be a more user friendly sort of tool, so that's why it exists.
>> What's the difference between upgrade and update?
>> Good question, what's the difference between upgrade and update? So upgrade is actually going to upgrade a package. So if I say sudo apt upgrade Node.js, this is going to go update the Node.js package, and it's going to say you already have the latest version, why are you asking me?
[00:01:01] What is it? Eight? That's real sad, notice, that makes me really sad that it has a deprecated version of node that installed. But, that's what it has on this registry, right? That is something that I guess bears mentioning is like, they're pretty conservative of how they upgrade packages.
[00:01:22] So in this case, I do not recommend installing Node.js through APT, I would suggest installing it directly from Node or from NodeSource or something like that. So that's what upgrade does upgrade, upgrades a package for you. Whereas update sudo apt update, this is going to go get a new version of the registry basically, it's going to go up, grab, like, here's all the latest version of the packages.
[00:01:47] This isn't actually upgrade any package, it updates the available packages that APT has to go get, right? So it gets a new list. So you can see it goes out there, it finds the patch list. It then rebuilds dependency tree and it figures everything out that way. So that yeah, that's the difference between the two.
[00:02:07] So run update, before you're an upgrade.
>> What's the package manager for Mac?
>> Homebrew, it's like not official, whereas, like, canonical makes the package manager for our mix ATP, homebrew is a community project. So I think, it's homebrew.sh. Nope. It's brew.sh. There's another one called MacPorts that is much slower, so I definitely recommend homebrew.
[00:02:46] And then you can come in and say, like brew info Node.js. Yeah, then you can see this comes from Node.js.org, blah, blah, blah, it installs 14.3, which is a much newer version. And then probably the next question would be what's the one for Windows? Microsoft just launched their new package manager and it is called winget or winget, depending on who you ask, it is winget that's what the intention was, but I'm quite happy with the winget.
[00:03:18] There was also Chocolatey as well, but that's kind of like the existing one, whereas when we get the new one.
>> It's APT and it's registries are all open source versus like, Node and npm is there's a company behind the registry, is it, how does that work?
>> Yeah, that's a good question, I actually don't know.
[00:03:41] The registry is available to like audit, you can go look at the registry and where the things come from, you can kinda audit the supply chain of the code there. Is the server serving a PC open source knowing Canonical I would assume, so but I don't want to say, because I don't actually know, whereas like you're correct, like npm.
[00:04:02] That's a close source server that npm, now owned by Github runs. The Canonical basically open source has everything.