YouTube2Text

Linux commands for Beginners 20 - Package Management on Fedora and CentOS (dnf and yum) — Transcript

by Learn Linux TV · 2,209 words · 308 segments · language en · Watch on YouTube

Full transcript

  1. 0:00[Music]
  2. 0:20so in a past video we've already
  3. 0:22explored the concept of package
  4. 0:25management I showed you all the commands
  5. 0:27to install upgrade packages remove
  6. 0:30packages basically everything you need
  7. 0:32to know to manage packages on your Linux
  8. 0:34system but that video was very specific
  9. 0:37to the Debian style that includes Debian
  10. 0:39itself distributions that are based on
  11. 0:42Debian as well as Ubuntu in
  12. 0:45distributions and are based on that
  13. 0:46which include pop OS or Linux Mint so by
  14. 0:49understanding the Debian style you
  15. 0:51understand already a large portion of
  16. 0:54all the distributions out there because
  17. 0:56the commands from one will usually apply
  18. 0:58to the other but what happens if you're
  19. 1:01using a distribution that is not based
  20. 1:03on Debian or Ubuntu and CentOS and
  21. 1:05Fedora fit into that example they are
  22. 1:08not based on Debian they use a
  23. 1:10completely different package manager so
  24. 1:12in this video I'm going to show you the
  25. 1:14basics of package management but I'm
  26. 1:17going to show you how to do that on sent
  27. 1:19OS as well as fedora so let's go ahead
  28. 1:22and dive right in okay so here are my
  29. 1:25terminal I have two Linode instances
  30. 1:28basically cloud virtual machines at my
  31. 1:32disposal here that I'm going to use for
  32. 1:34this tutorial if you don't already know
  33. 1:36how to create your own Linode I have a
  34. 1:38dedicated video for that but it doesn't
  35. 1:40have to be a cloud instance it could be
  36. 1:42a VirtualBox virtual machine a physical
  37. 1:45installation it really doesn't matter I
  38. 1:47have two terminal tabs open here on the
  39. 1:50Left I have sent to Wes and then here on
  40. 1:53the right I have Fedora how do I know
  41. 1:57that because this name is very
  42. 1:58misleading I didn't even bother changing
  43. 2:00the name when I created these instances
  44. 2:02so how would I tell so this isn't the
  45. 2:05subject matter that we're going over but
  46. 2:06it's just a quick tip I could simply do
  47. 2:08cat slash Etsy OS - release so that
  48. 2:13command right there will give me some
  49. 2:15information about the distribution that
  50. 2:18I'm running on so I'll press ENTER and
  51. 2:20you can see from here I'm using sent to
  52. 2:22s like I mentioned it's version seven
  53. 2:24and then we have some more information
  54. 2:26going down here if I do the same thing
  55. 2:29on my Fedora Linode
  56. 2:34you can see that I get pretty much the
  57. 2:37same information I am running Fedora 30
  58. 2:40this is the server Edition and then
  59. 2:43again we have all the information about
  60. 2:45this particular distribution so let's
  61. 2:50get started with scent OS scent OS uses
  62. 2:54the yum package manager which is spelled
  63. 2:57Y um and it gets some basic information
  64. 2:59here we can just look at the man page we
  65. 3:02can see what it stands for
  66. 3:03yellow-dog updater modified and then we
  67. 3:07can get some information here if we
  68. 3:09scroll down we get all kinds of options
  69. 3:10and I'm not going to go over all of
  70. 3:12these options here I'm going to give you
  71. 3:13guys the basics but we have update
  72. 3:16update minimal check update upgrade
  73. 3:19remove and so on I'm gonna press Q to
  74. 3:26quit out of here and let's install a
  75. 3:29package I'm going to show you the way in
  76. 3:31which you would install a package now
  77. 3:33first of all we should search for
  78. 3:35packages so what I'm going to do is type
  79. 3:37yum search and then a search term that
  80. 3:41we can use to search for so I want to
  81. 3:43install vim enhanced so I'll press Enter
  82. 3:47and we can see the package name right
  83. 3:49here is vim enhance we can ignore the
  84. 3:52dot x86 64 unless we actually want to
  85. 3:55install something else
  86. 3:56we're basically interested in the name
  87. 3:59before the period here I already knew
  88. 4:01that the package name was vim in Hance
  89. 4:03but I just wanted to show you guys the
  90. 4:05process of searching now that we know
  91. 4:08the name of the package that we want to
  92. 4:10install we do sudo which I actually
  93. 4:12don't need to do because I'm actually
  94. 4:14running as root as you can see right
  95. 4:16here yum install and then the name of
  96. 4:20the package I'll press Enter now what is
  97. 4:28going to do is look at which
  98. 4:30dependencies are necessary to satisfy
  99. 4:33the requirements of this package and
  100. 4:35here at the bottom it's going to give me
  101. 4:37an option to agree and go ahead and
  102. 4:40download it I want to say no for now
  103. 4:44and recall the command so that's how you
  104. 4:48install something now one thing you can
  105. 4:50do is do dash y for yes which basically
  106. 4:54means it's not going to prompt you at
  107. 4:56all now here's the difference
  108. 4:59it just went and did it
  109. 5:01it didn't ask me are you sure like you
  110. 5:02saw in the previous step it went ahead
  111. 5:05and installed it and again I just added
  112. 5:08the dash Y to that command now I don't
  113. 5:12really advise the use of - why it's
  114. 5:15actually a pet peeve of mine I see this
  115. 5:17happen all the time a lot of Linux
  116. 5:20administrators out there use - why - why
  117. 5:23means except you know the confirmation
  118. 5:25but what if it wants to remove a package
  119. 5:27and you didn't want it removed or you
  120. 5:30know ends up removing a bunch of
  121. 5:31dependencies and breaks something else I
  122. 5:33really don't like - why but you know
  123. 5:36it's ok because sometimes in scripts
  124. 5:38you'll need something like - why to
  125. 5:40automate something and you know there's
  126. 5:43really no way around that because I'm
  127. 5:44assuming you'll test your scripts before
  128. 5:46you deploy them you know that they work
  129. 5:48you know that the commands do what you
  130. 5:49want just use - why with care so I went
  131. 5:53ahead and installed them enhanced which
  132. 5:57means I do have them installed that's my
  133. 6:00preferred text editor as you may have
  134. 6:02heard in a previous video and now we
  135. 6:06have that installed but what if I want
  136. 6:09to remove that package I could do sudo
  137. 6:11yum remove and then the name of the
  138. 6:15package which again was vim enhanced and
  139. 6:21it's basically just giving me a
  140. 6:22confirmation I'll say yes clear the
  141. 6:26screen and you can see that vim is not
  142. 6:31installed anymore we'll get back to the
  143. 6:34video shortly but I'd like to take a
  144. 6:36moment to thank my sponsor Linode Linode
  145. 6:39makes it easy and affordable to host
  146. 6:41your app site or service in the cloud
  147. 6:44unlike entry-level hosting services that
  148. 6:47only offer pre-configured servers Linode
  149. 6:49is your step up to powerful fast and
  150. 6:52fully configurable cloud computing lend
  151. 6:55note offers many of the top Linux
  152. 6:57distribution
  153. 6:57that you can install in one of their 10
  154. 6:59worldwide data centers with server plans
  155. 7:02starting at just $5 plus no hidden fees
  156. 7:05or surprise overages Linode offers
  157. 7:09no-nonsense hosting at a price you can
  158. 7:11afford
  159. 7:12check out the URL at the bottom of the
  160. 7:15screen to receive $20 in credit toward
  161. 7:17your very own Linode instance I
  162. 7:19definitely recommend you check out
  163. 7:21Linode it's also the platform I use
  164. 7:24personally and I couldn't be happier
  165. 7:26with it
  166. 7:26be sure to check out Linode and let's
  167. 7:28get back to the video now let's check
  168. 7:32out fedora now at first glance you might
  169. 7:37think that fedora uses the same package
  170. 7:39manager if you do which yum you'll see
  171. 7:43that yum is actually it's here it's
  172. 7:46present and you can actually use that to
  173. 7:49install packages but before we do that
  174. 7:51let's take a closer look if we do LS
  175. 7:54against the results of the witch command
  176. 7:57which again was user been yum and I'm
  177. 8:01gonna use - L here we see something
  178. 8:05pretty interesting it's a symbolic link
  179. 8:08that's pointing to something called DNF
  180. 8:11now let's do the same thing here user
  181. 8:15Binyam same thing it's not assembly it's
  182. 8:21an actual binary so we could already see
  183. 8:24that that's different so what's going on
  184. 8:28here what is DNF so do man DNF and from
  185. 8:34the description here we see that DNF is
  186. 8:36the next upcoming major version of YUM
  187. 8:39so already we can see that Fedora
  188. 8:42actually uses a different package
  189. 8:44manager than cent OS so let's see what
  190. 8:49happens if we try to use yum on fedora
  191. 8:52we'll do this the same thing Jung search
  192. 8:56vim enhanced
  193. 9:02and it's refreshing itself which can
  194. 9:05happen and we have a result so the young
  195. 9:09command seemed to work fine so what
  196. 9:12happens if we try to use it to actually
  197. 9:15install a package so sudo yum install
  198. 9:18again I don't actually need sudo M
  199. 9:21enhanced
  200. 9:30now in this case vim enhanced was
  201. 9:33already installed in the Linode instance
  202. 9:35so let's try a different package for
  203. 9:37example I'm going to install a package
  204. 9:40called H top now you need a different
  205. 9:43repository and sent to us to install
  206. 9:44this but it's something that I want in
  207. 9:46Fedora it is it is actually available so
  208. 9:48if I do
  209. 9:48yum search H top we can see that it's
  210. 9:54available so I'm going to do yum install
  211. 9:57H top I'm leaving out sudu because I
  212. 9:59don't actually need it I'm running his
  213. 10:01route and you can actually see that it's
  214. 10:06working just fine I'll say no and let's
  215. 10:11change YUM to DNF DNF install h top now
  216. 10:21if I didn't know any better I'd say that
  217. 10:23the output looks exactly the same so
  218. 10:26what's going on here as you saw in a
  219. 10:29previous command I entered the yum
  220. 10:31executable is actually a symbolic link
  221. 10:34to DNF in Fedora so whether you call it
  222. 10:36with DNF or yum you're using DNF so if
  223. 10:40you use yum to run your updates or
  224. 10:43install packages you're actually being
  225. 10:46redirected to DNF previous versions of
  226. 10:48fedora would actually tell you this on
  227. 10:50the command line to make sure that you
  228. 10:53were aware of that and the reason why
  229. 10:55they're doing this is because Fedora
  230. 10:57used to use yum just like sent to wes
  231. 10:59and a lot of administrators out there
  232. 11:01may have written scripts that are
  233. 11:04actually calling yum and this sim link
  234. 11:07actually serves as a compatibility layer
  235. 11:09to make sure that the scripts actually
  236. 11:13work so you don't actually have to
  237. 11:15manage and change all of your scripts to
  238. 11:17use DNF manually it'll just simply
  239. 11:18redirect now at a later date it's
  240. 11:20possible that that redirection will be
  241. 11:23removed so if you do have older scripts
  242. 11:25that are using yeoman Fedora you
  243. 11:26probably should get those changed over
  244. 11:28to DNF so I'm going to say Y for yes and
  245. 11:32press enter and here this is the very
  246. 11:37first package that's ever being
  247. 11:39installed here from this repository so I
  248. 11:41was just making sure that it's okay
  249. 11:43to proceed which is fine and I'll say
  250. 11:45why enter again and it went ahead and
  251. 11:48installed a stop let's go ahead and run
  252. 11:50it and we can see that H top is actually
  253. 11:54installed quit out here so now what will
  254. 11:59we do if we want to upgrade all of the
  255. 12:01packages installed on the system so
  256. 12:04let's go over here to cent OS and let's
  257. 12:07run yum upgrade if I wasn't running his
  258. 12:11route I would need to use sudo but a yum
  259. 12:13upgrade should allow us to install all
  260. 12:16the package updates for everything on
  261. 12:18the distribution so let's check it out
  262. 12:22and we see that we have 72 packages that
  263. 12:28need to be upgraded one will be newly
  264. 12:31installed here so press Y and an enter
  265. 12:34see everything downloaded very quickly
  266. 12:38and now the packages are installing so
  267. 12:43it looks like a hundred and forty five
  268. 12:45components here to update
  269. 12:54you
  270. 13:01and there we go we updated all the
  271. 13:03packages on the scent OS system so let's
  272. 13:07do the same thing over here on fedora
  273. 13:09I'll use DNF upgrade we have quite a few
  274. 13:19packages here 294 actually more than
  275. 13:22that so let's go ahead and get those
  276. 13:24installed so why enter
  277. 13:33you
  278. 13:46and there we go the installed updates on
  279. 13:48fedora of course there's more to the DNF
  280. 13:52and yum commands than just that but I
  281. 13:55showed you how to search for packages
  282. 13:57install packages and upgrade them as
  283. 13:59well so that's more than enough to get
  284. 14:01you started and then you could check out
  285. 14:02the man pages for more but I wanted to
  286. 14:05make sure that I gave you guys a look at
  287. 14:06package management on distributions that
  288. 14:08are not based on Debian or a boon - and
  289. 14:11this video has solved that purpose
  290. 14:13so stay tuned guys I will have more
  291. 14:16videos in this series coming very soon
  292. 14:19make sure you subscribe and you'll be
  293. 14:21the first to see them when they come out
  294. 14:22thanks again for watching thanks for
  295. 14:26checking out my video I really
  296. 14:28appreciate it if you found it useful
  297. 14:29click that like button and if you
  298. 14:31haven't already done so make sure you
  299. 14:33subscribe so you'll see the latest
  300. 14:35content as soon as it becomes available
  301. 14:37if you want to help me out there's links
  302. 14:40down below for my patreon page as well
  303. 14:43as links for purchasing my Linux books
  304. 14:45and also my affiliate store which has a
  305. 14:48listing of Linux compatible hardware
  306. 14:50that I've actually tested personally
  307. 14:52thanks again for watching and I'll see
  308. 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.