Linux commands for Beginners 20 - Package Management on Fedora and CentOS (dnf and yum) — Transcript
Full transcript
- 0:00[Music]
- 0:20so in a past video we've already
- 0:22explored the concept of package
- 0:25management I showed you all the commands
- 0:27to install upgrade packages remove
- 0:30packages basically everything you need
- 0:32to know to manage packages on your Linux
- 0:34system but that video was very specific
- 0:37to the Debian style that includes Debian
- 0:39itself distributions that are based on
- 0:42Debian as well as Ubuntu in
- 0:45distributions and are based on that
- 0:46which include pop OS or Linux Mint so by
- 0:49understanding the Debian style you
- 0:51understand already a large portion of
- 0:54all the distributions out there because
- 0:56the commands from one will usually apply
- 0:58to the other but what happens if you're
- 1:01using a distribution that is not based
- 1:03on Debian or Ubuntu and CentOS and
- 1:05Fedora fit into that example they are
- 1:08not based on Debian they use a
- 1:10completely different package manager so
- 1:12in this video I'm going to show you the
- 1:14basics of package management but I'm
- 1:17going to show you how to do that on sent
- 1:19OS as well as fedora so let's go ahead
- 1:22and dive right in okay so here are my
- 1:25terminal I have two Linode instances
- 1:28basically cloud virtual machines at my
- 1:32disposal here that I'm going to use for
- 1:34this tutorial if you don't already know
- 1:36how to create your own Linode I have a
- 1:38dedicated video for that but it doesn't
- 1:40have to be a cloud instance it could be
- 1:42a VirtualBox virtual machine a physical
- 1:45installation it really doesn't matter I
- 1:47have two terminal tabs open here on the
- 1:50Left I have sent to Wes and then here on
- 1:53the right I have Fedora how do I know
- 1:57that because this name is very
- 1:58misleading I didn't even bother changing
- 2:00the name when I created these instances
- 2:02so how would I tell so this isn't the
- 2:05subject matter that we're going over but
- 2:06it's just a quick tip I could simply do
- 2:08cat slash Etsy OS - release so that
- 2:13command right there will give me some
- 2:15information about the distribution that
- 2:18I'm running on so I'll press ENTER and
- 2:20you can see from here I'm using sent to
- 2:22s like I mentioned it's version seven
- 2:24and then we have some more information
- 2:26going down here if I do the same thing
- 2:29on my Fedora Linode
- 2:34you can see that I get pretty much the
- 2:37same information I am running Fedora 30
- 2:40this is the server Edition and then
- 2:43again we have all the information about
- 2:45this particular distribution so let's
- 2:50get started with scent OS scent OS uses
- 2:54the yum package manager which is spelled
- 2:57Y um and it gets some basic information
- 2:59here we can just look at the man page we
- 3:02can see what it stands for
- 3:03yellow-dog updater modified and then we
- 3:07can get some information here if we
- 3:09scroll down we get all kinds of options
- 3:10and I'm not going to go over all of
- 3:12these options here I'm going to give you
- 3:13guys the basics but we have update
- 3:16update minimal check update upgrade
- 3:19remove and so on I'm gonna press Q to
- 3:26quit out of here and let's install a
- 3:29package I'm going to show you the way in
- 3:31which you would install a package now
- 3:33first of all we should search for
- 3:35packages so what I'm going to do is type
- 3:37yum search and then a search term that
- 3:41we can use to search for so I want to
- 3:43install vim enhanced so I'll press Enter
- 3:47and we can see the package name right
- 3:49here is vim enhance we can ignore the
- 3:52dot x86 64 unless we actually want to
- 3:55install something else
- 3:56we're basically interested in the name
- 3:59before the period here I already knew
- 4:01that the package name was vim in Hance
- 4:03but I just wanted to show you guys the
- 4:05process of searching now that we know
- 4:08the name of the package that we want to
- 4:10install we do sudo which I actually
- 4:12don't need to do because I'm actually
- 4:14running as root as you can see right
- 4:16here yum install and then the name of
- 4:20the package I'll press Enter now what is
- 4:28going to do is look at which
- 4:30dependencies are necessary to satisfy
- 4:33the requirements of this package and
- 4:35here at the bottom it's going to give me
- 4:37an option to agree and go ahead and
- 4:40download it I want to say no for now
- 4:44and recall the command so that's how you
- 4:48install something now one thing you can
- 4:50do is do dash y for yes which basically
- 4:54means it's not going to prompt you at
- 4:56all now here's the difference
- 4:59it just went and did it
- 5:01it didn't ask me are you sure like you
- 5:02saw in the previous step it went ahead
- 5:05and installed it and again I just added
- 5:08the dash Y to that command now I don't
- 5:12really advise the use of - why it's
- 5:15actually a pet peeve of mine I see this
- 5:17happen all the time a lot of Linux
- 5:20administrators out there use - why - why
- 5:23means except you know the confirmation
- 5:25but what if it wants to remove a package
- 5:27and you didn't want it removed or you
- 5:30know ends up removing a bunch of
- 5:31dependencies and breaks something else I
- 5:33really don't like - why but you know
- 5:36it's ok because sometimes in scripts
- 5:38you'll need something like - why to
- 5:40automate something and you know there's
- 5:43really no way around that because I'm
- 5:44assuming you'll test your scripts before
- 5:46you deploy them you know that they work
- 5:48you know that the commands do what you
- 5:49want just use - why with care so I went
- 5:53ahead and installed them enhanced which
- 5:57means I do have them installed that's my
- 6:00preferred text editor as you may have
- 6:02heard in a previous video and now we
- 6:06have that installed but what if I want
- 6:09to remove that package I could do sudo
- 6:11yum remove and then the name of the
- 6:15package which again was vim enhanced and
- 6:21it's basically just giving me a
- 6:22confirmation I'll say yes clear the
- 6:26screen and you can see that vim is not
- 6:31installed anymore we'll get back to the
- 6:34video shortly but I'd like to take a
- 6:36moment to thank my sponsor Linode Linode
- 6:39makes it easy and affordable to host
- 6:41your app site or service in the cloud
- 6:44unlike entry-level hosting services that
- 6:47only offer pre-configured servers Linode
- 6:49is your step up to powerful fast and
- 6:52fully configurable cloud computing lend
- 6:55note offers many of the top Linux
- 6:57distribution
- 6:57that you can install in one of their 10
- 6:59worldwide data centers with server plans
- 7:02starting at just $5 plus no hidden fees
- 7:05or surprise overages Linode offers
- 7:09no-nonsense hosting at a price you can
- 7:11afford
- 7:12check out the URL at the bottom of the
- 7:15screen to receive $20 in credit toward
- 7:17your very own Linode instance I
- 7:19definitely recommend you check out
- 7:21Linode it's also the platform I use
- 7:24personally and I couldn't be happier
- 7:26with it
- 7:26be sure to check out Linode and let's
- 7:28get back to the video now let's check
- 7:32out fedora now at first glance you might
- 7:37think that fedora uses the same package
- 7:39manager if you do which yum you'll see
- 7:43that yum is actually it's here it's
- 7:46present and you can actually use that to
- 7:49install packages but before we do that
- 7:51let's take a closer look if we do LS
- 7:54against the results of the witch command
- 7:57which again was user been yum and I'm
- 8:01gonna use - L here we see something
- 8:05pretty interesting it's a symbolic link
- 8:08that's pointing to something called DNF
- 8:11now let's do the same thing here user
- 8:15Binyam same thing it's not assembly it's
- 8:21an actual binary so we could already see
- 8:24that that's different so what's going on
- 8:28here what is DNF so do man DNF and from
- 8:34the description here we see that DNF is
- 8:36the next upcoming major version of YUM
- 8:39so already we can see that Fedora
- 8:42actually uses a different package
- 8:44manager than cent OS so let's see what
- 8:49happens if we try to use yum on fedora
- 8:52we'll do this the same thing Jung search
- 8:56vim enhanced
- 9:02and it's refreshing itself which can
- 9:05happen and we have a result so the young
- 9:09command seemed to work fine so what
- 9:12happens if we try to use it to actually
- 9:15install a package so sudo yum install
- 9:18again I don't actually need sudo M
- 9:21enhanced
- 9:30now in this case vim enhanced was
- 9:33already installed in the Linode instance
- 9:35so let's try a different package for
- 9:37example I'm going to install a package
- 9:40called H top now you need a different
- 9:43repository and sent to us to install
- 9:44this but it's something that I want in
- 9:46Fedora it is it is actually available so
- 9:48if I do
- 9:48yum search H top we can see that it's
- 9:54available so I'm going to do yum install
- 9:57H top I'm leaving out sudu because I
- 9:59don't actually need it I'm running his
- 10:01route and you can actually see that it's
- 10:06working just fine I'll say no and let's
- 10:11change YUM to DNF DNF install h top now
- 10:21if I didn't know any better I'd say that
- 10:23the output looks exactly the same so
- 10:26what's going on here as you saw in a
- 10:29previous command I entered the yum
- 10:31executable is actually a symbolic link
- 10:34to DNF in Fedora so whether you call it
- 10:36with DNF or yum you're using DNF so if
- 10:40you use yum to run your updates or
- 10:43install packages you're actually being
- 10:46redirected to DNF previous versions of
- 10:48fedora would actually tell you this on
- 10:50the command line to make sure that you
- 10:53were aware of that and the reason why
- 10:55they're doing this is because Fedora
- 10:57used to use yum just like sent to wes
- 10:59and a lot of administrators out there
- 11:01may have written scripts that are
- 11:04actually calling yum and this sim link
- 11:07actually serves as a compatibility layer
- 11:09to make sure that the scripts actually
- 11:13work so you don't actually have to
- 11:15manage and change all of your scripts to
- 11:17use DNF manually it'll just simply
- 11:18redirect now at a later date it's
- 11:20possible that that redirection will be
- 11:23removed so if you do have older scripts
- 11:25that are using yeoman Fedora you
- 11:26probably should get those changed over
- 11:28to DNF so I'm going to say Y for yes and
- 11:32press enter and here this is the very
- 11:37first package that's ever being
- 11:39installed here from this repository so I
- 11:41was just making sure that it's okay
- 11:43to proceed which is fine and I'll say
- 11:45why enter again and it went ahead and
- 11:48installed a stop let's go ahead and run
- 11:50it and we can see that H top is actually
- 11:54installed quit out here so now what will
- 11:59we do if we want to upgrade all of the
- 12:01packages installed on the system so
- 12:04let's go over here to cent OS and let's
- 12:07run yum upgrade if I wasn't running his
- 12:11route I would need to use sudo but a yum
- 12:13upgrade should allow us to install all
- 12:16the package updates for everything on
- 12:18the distribution so let's check it out
- 12:22and we see that we have 72 packages that
- 12:28need to be upgraded one will be newly
- 12:31installed here so press Y and an enter
- 12:34see everything downloaded very quickly
- 12:38and now the packages are installing so
- 12:43it looks like a hundred and forty five
- 12:45components here to update
- 12:54you
- 13:01and there we go we updated all the
- 13:03packages on the scent OS system so let's
- 13:07do the same thing over here on fedora
- 13:09I'll use DNF upgrade we have quite a few
- 13:19packages here 294 actually more than
- 13:22that so let's go ahead and get those
- 13:24installed so why enter
- 13:33you
- 13:46and there we go the installed updates on
- 13:48fedora of course there's more to the DNF
- 13:52and yum commands than just that but I
- 13:55showed you how to search for packages
- 13:57install packages and upgrade them as
- 13:59well so that's more than enough to get
- 14:01you started and then you could check out
- 14:02the man pages for more but I wanted to
- 14:05make sure that I gave you guys a look at
- 14:06package management on distributions that
- 14:08are not based on Debian or a boon - and
- 14:11this video has solved that purpose
- 14:13so stay tuned guys I will have more
- 14:16videos in this series coming very soon
- 14:19make sure you subscribe and you'll be
- 14:21the first to see them when they come out
- 14:22thanks again for watching thanks for
- 14:26checking out my video I really
- 14:28appreciate it if you found it useful
- 14:29click that like button and if you
- 14:31haven't already done so make sure you
- 14:33subscribe so you'll see the latest
- 14:35content as soon as it becomes available
- 14:37if you want to help me out there's links
- 14:40down below for my patreon page as well
- 14:43as links for purchasing my Linux books
- 14:45and also my affiliate store which has a
- 14:48listing of Linux compatible hardware
- 14:50that I've actually tested personally
- 14:52thanks again for watching and I'll see
- 14:54you in the next video
About this transcript
This page contains the full transcript of Linux commands for Beginners 20 - Package Management on Fedora and CentOS (dnf and yum) by Learn Linux TV, generated from the public captions YouTube serves with the video. The transcript has 2,209 words across 308 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.
What you can do with it
Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to translate the transcript into 100+ languages.
Free YouTube transcript tool
YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, translation to 100+ languages, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.