1 00:00:00,150 --> 00:00:01,560 Hello, the beautiful people. 2 00:00:01,560 --> 00:00:05,880 Now, in the last video you saw how you can compile source code from scratch and install it on your 3 00:00:05,880 --> 00:00:06,510 machine. 4 00:00:06,660 --> 00:00:11,010 Now, this is a great process for understanding and customizing the software running on your computer, 5 00:00:11,010 --> 00:00:14,220 but for most everyday things it's usually just a bit too much work. 6 00:00:14,430 --> 00:00:18,840 So what if you could have a library of software that you can browse and have all pre compiled and ready 7 00:00:18,840 --> 00:00:22,290 to go with the push of a button or run of a command? 8 00:00:22,710 --> 00:00:26,250 Well, that's exactly what the software repositories and package managers are for. 9 00:00:26,250 --> 00:00:28,620 And in this video, we'll be covering what they're all about. 10 00:00:28,830 --> 00:00:32,549 So in this video, you're going to learn about the different software repositories that are available 11 00:00:32,549 --> 00:00:36,060 on Ubuntu and how to search them using the online websites. 12 00:00:36,210 --> 00:00:41,160 And by the end of the video you'll know what the different Ubuntu repositories are and you'll also know 13 00:00:41,160 --> 00:00:42,370 what a package manager is. 14 00:00:42,390 --> 00:00:45,090 So this lecture is going to be jam packed with useful information. 15 00:00:45,090 --> 00:00:46,950 So let's go ahead and get right into it. 16 00:00:48,220 --> 00:00:48,670 Okay. 17 00:00:48,670 --> 00:00:51,910 So the first thing we need to know is what a software repository is. 18 00:00:51,910 --> 00:00:56,110 So think of a software repository as a big library filled with software. 19 00:00:56,140 --> 00:01:00,400 Now, when you go to a library, you can search for books, you can read about the books, you can look 20 00:01:00,400 --> 00:01:04,599 at different versions of the books, and you can compare which books that you might want to borrow and 21 00:01:04,599 --> 00:01:06,040 then check them out at the library. 22 00:01:06,040 --> 00:01:10,640 And a software repository is like a library, except you don't have to give the software back. 23 00:01:10,660 --> 00:01:14,920 And even better, when a new version of the software comes along, you can automatically update that 24 00:01:14,920 --> 00:01:20,290 piece of software and all the software on your entire system to the new versions that are available 25 00:01:20,290 --> 00:01:21,310 with a simple command. 26 00:01:21,310 --> 00:01:26,210 And this helps keep your system secure and reliable and it's also totally epic. 27 00:01:26,230 --> 00:01:31,720 Now in Ubuntu there are four different repositories and each repository stores a different type of software 28 00:01:31,720 --> 00:01:36,520 and they are described on the main website for Ubuntu which is a 12. com. 29 00:01:36,670 --> 00:01:42,790 Now if we head over to help ubuntu dot com forward slash community four slash repositories with a capital 30 00:01:42,790 --> 00:01:45,310 R and then forward slash a bond to with a capital U. 31 00:01:45,310 --> 00:01:46,540 I'll put a link in the resources. 32 00:01:46,540 --> 00:01:52,200 By the way, if we head over to that, we'll see information about the different repositories. 33 00:01:52,210 --> 00:01:52,400 Okay. 34 00:01:52,420 --> 00:01:54,820 So you see a section here that says what are the repositories? 35 00:01:54,820 --> 00:01:56,440 And you can see that for a bunch too. 36 00:01:56,440 --> 00:01:58,630 There are four main repositories. 37 00:01:58,630 --> 00:02:05,410 Now, the main repository is the repository that holds all the software that is actively maintained 38 00:02:05,410 --> 00:02:07,630 and updated by Canonical. 39 00:02:07,630 --> 00:02:10,539 And Canonical is the company that created Ubuntu. 40 00:02:10,539 --> 00:02:15,370 Now all the software in there is free as in freedom and is also open source. 41 00:02:15,400 --> 00:02:15,830 Okay. 42 00:02:15,910 --> 00:02:21,940 Now the main repository is the most reliable repository and you should try and select from suitable 43 00:02:21,940 --> 00:02:26,140 software in the main repository at the first instance where possible. 44 00:02:26,200 --> 00:02:29,650 Now the second Ubuntu repository is the universe repository. 45 00:02:29,650 --> 00:02:34,270 Now software in this repository is also free as in freedom, and it's also open source. 46 00:02:34,270 --> 00:02:38,950 However, instead of being maintained by Canonical, it is maintained by the Ubuntu community and as 47 00:02:38,950 --> 00:02:45,340 a result it is therefore theoretically maybe less rigorous and more prone to bugs than the main repository. 48 00:02:45,340 --> 00:02:47,890 But most of the time it's fantastic in my experience. 49 00:02:48,010 --> 00:02:53,170 Now the third, the third repository in the Ubuntu system is the restricted repository. 50 00:02:53,170 --> 00:02:58,780 Now the restricted repository includes proprietary software and drivers for company specific devices 51 00:02:58,780 --> 00:03:00,820 such as wireless cards and so on. 52 00:03:01,210 --> 00:03:06,190 Now this repository helps ensure that the devices on your computer are more likely to work out of the 53 00:03:06,190 --> 00:03:07,270 box, shall we say. 54 00:03:07,270 --> 00:03:11,860 But the software is usually proprietary and therefore doesn't usually give you the freedoms of the other 55 00:03:11,860 --> 00:03:12,940 software it gives you. 56 00:03:13,150 --> 00:03:18,280 Also, you might or might not be able to directly examine the source code of the software in the restricted 57 00:03:18,280 --> 00:03:18,970 repository. 58 00:03:18,970 --> 00:03:19,660 And this to spend. 59 00:03:19,660 --> 00:03:22,390 This depends on the specific use case. 60 00:03:22,390 --> 00:03:26,410 And the fourth and final repository is the multiverse repository. 61 00:03:27,250 --> 00:03:32,680 Now the multiverse repository contains software that is restricted either by copyright or legal issues. 62 00:03:32,680 --> 00:03:37,090 The software in the multiverse repository might or might not have accessible source code. 63 00:03:37,360 --> 00:03:42,100 Now you can see here that the Ubuntu philosophy is generally about giving the user choice about what 64 00:03:42,130 --> 00:03:43,570 software they want to use. 65 00:03:43,720 --> 00:03:48,460 There are two repositories that are free and open source which are the main and the universe repositories 66 00:03:48,460 --> 00:03:53,830 and there are two other repositories which which aren't free and open source or where the software is 67 00:03:53,830 --> 00:03:54,640 unlikely to be. 68 00:03:54,640 --> 00:03:55,120 So. 69 00:03:55,180 --> 00:04:00,310 So to some people, using non free software is abhorrent and completely unacceptable, whereas to others 70 00:04:00,310 --> 00:04:02,710 it will be fine if it gets the job done now. 71 00:04:02,710 --> 00:04:05,020 But to leaves that choice up to you. 72 00:04:05,020 --> 00:04:10,750 But of the distributions such as fedora only include free software in the repositories and do not include 73 00:04:10,750 --> 00:04:12,400 software that is non free. 74 00:04:12,400 --> 00:04:16,630 Now this can cause a reductions in convenience, but it has other benefits. 75 00:04:16,630 --> 00:04:21,760 Now Ubuntu leaves the choice up to you as to what you prefer and now that you've been informed about 76 00:04:21,760 --> 00:04:25,060 the free software debate, you're in a better position to choose for yourself. 77 00:04:25,060 --> 00:04:29,500 So now that we understand what the for Ubuntu repositories are and the differences between them, let 78 00:04:29,500 --> 00:04:30,970 me show you where they hang out online. 79 00:04:30,970 --> 00:04:36,550 Now, I don't mean social media, but there's a link called packages dot ubuntu dot com. 80 00:04:36,550 --> 00:04:42,280 So if we head over to that here, we can browse through the list of packages and we can see different 81 00:04:42,280 --> 00:04:46,960 links depending upon what version of a bundle to that we're running now. 82 00:04:46,960 --> 00:04:51,640 The code name will change for every new release of Ubuntu in alphabetical order. 83 00:04:51,640 --> 00:05:00,250 So for example, the current one is called artful aardvark or Artful for short, and you can see what 84 00:05:00,250 --> 00:05:03,670 the code name for your distribution is by using this command in the command line. 85 00:05:03,670 --> 00:05:10,810 So you open up your terminal and you type in LSB, underscore release, and you give it the A option, 86 00:05:10,810 --> 00:05:14,710 and it will it will print out all the information about your button to distribution. 87 00:05:14,710 --> 00:05:17,050 And you can see that mine is called Artful Aardvark. 88 00:05:17,050 --> 00:05:20,650 And it tells me down the bottom here, the code name is Artful. 89 00:05:20,650 --> 00:05:28,600 So I would click on the artful link, which you can see here to to open to see what packages are applicable 90 00:05:28,600 --> 00:05:28,870 to me. 91 00:05:28,870 --> 00:05:31,420 But you can click on whatever code name is appropriate for you. 92 00:05:31,420 --> 00:05:34,480 When you watch this video, it all works basically the same. 93 00:05:34,570 --> 00:05:37,960 Now in here are all the packages or the package categories. 94 00:05:38,200 --> 00:05:40,900 So you can see a whole bunch of categories in here. 95 00:05:41,590 --> 00:05:44,620 You can see, for example, we've got things for web servers. 96 00:05:44,620 --> 00:05:47,350 You can see things that we've got for fonts we've got. 97 00:05:47,430 --> 00:05:47,940 Editors. 98 00:05:47,940 --> 00:05:54,150 We've got documentation, databases, administration, utilities and a whole lot of other stuff programming 99 00:05:54,150 --> 00:05:58,600 languages, Python and text processing video. 100 00:05:58,620 --> 00:05:59,580 It just goes on and on. 101 00:05:59,820 --> 00:06:02,160 There's so many different things and these are just categories. 102 00:06:02,400 --> 00:06:05,250 So there's loads of different packages inside each of these categories. 103 00:06:05,250 --> 00:06:09,090 But if we scroll down, we'll notice that there's a couple of important links down here. 104 00:06:09,090 --> 00:06:13,350 We've got the all packages link and we've got the compact compressed text list. 105 00:06:13,350 --> 00:06:19,980 So this one here is just a if I open it in a new tab, we can see that it's just a kind of text file 106 00:06:20,430 --> 00:06:24,270 here with a list of every single one of the packages. 107 00:06:24,270 --> 00:06:30,120 And I downloaded this text file when I was preparing the course and ran it through the word count command 108 00:06:30,120 --> 00:06:36,540 and counted the amount of lines after cutting out any header information and found that there were 74,060 109 00:06:36,540 --> 00:06:40,770 packages, which is crazy, but you know, it's there for you to play with. 110 00:06:40,820 --> 00:06:43,480 I'm just going to close up, but we're not interested in that for this video. 111 00:06:43,500 --> 00:06:46,560 What we're interested in is this link here that says all packages. 112 00:06:46,560 --> 00:06:52,800 And if I click that, it'll open up a web page that shows you all the packages. 113 00:06:52,800 --> 00:06:55,200 So let's just wait for that to load up a second. 114 00:06:56,070 --> 00:06:57,090 So there we are. 115 00:06:57,360 --> 00:07:02,460 So now we get a web page that gives us a link to each available package in Ubuntu and you may notice 116 00:07:02,460 --> 00:07:07,380 that it shows you in square brackets which repository the things came from. 117 00:07:07,380 --> 00:07:14,400 So we can see here that this zero add package came from the universe repository and if we scroll down 118 00:07:14,400 --> 00:07:17,370 we'll be able to see some that come from other repositories as well. 119 00:07:17,370 --> 00:07:21,390 We're seeing we're getting a lot from the universe repository, but you see here we've got one coming 120 00:07:21,390 --> 00:07:22,530 from multiverse. 121 00:07:22,980 --> 00:07:28,230 And if you find a package that doesn't have anything in a square brackets next to it, that means it's 122 00:07:28,230 --> 00:07:30,120 from the main repository. 123 00:07:30,360 --> 00:07:35,040 So for example, this a lib bin, you can see it doesn't have anything next to it. 124 00:07:35,310 --> 00:07:37,680 That means it comes from the main repository. 125 00:07:37,920 --> 00:07:40,530 So that's just something to be aware of as well. 126 00:07:40,530 --> 00:07:44,280 But for now, for the purposes of this video, let's just go ahead and click on this top link, this 127 00:07:44,280 --> 00:07:47,130 this package called Zero Add. 128 00:07:47,160 --> 00:07:53,130 And when we click on it, we'll notice that a new Web page opens and we see that the package is called 129 00:07:53,130 --> 00:07:55,530 zero, and we can see the package name right at the top. 130 00:07:55,530 --> 00:08:00,480 And then in these parentheses we can see the version number of the package. 131 00:08:00,480 --> 00:08:05,250 And then we can see in these square brackets the repository that the package has come from. 132 00:08:05,250 --> 00:08:09,690 And as I said, if there isn't any such information, then it's from the main repository. 133 00:08:09,870 --> 00:08:10,400 Okay. 134 00:08:11,280 --> 00:08:17,040 And as we know, the universe repository contains most contains free and open source software, but 135 00:08:17,040 --> 00:08:21,390 it's maintained by the community and doesn't receive any formal updates or maintenance from the Ubuntu 136 00:08:21,390 --> 00:08:23,130 developers at Canonical. 137 00:08:23,130 --> 00:08:31,890 Then underneath that we can see a list called other packages that are related to this package and we 138 00:08:31,890 --> 00:08:36,150 can see that we that they have required version numbers in these parentheses here. 139 00:08:36,150 --> 00:08:42,510 So for example, this dpkg package must be greater than or equal to version 1.15.6. 140 00:08:42,990 --> 00:08:47,340 And you can see that there's quite a few different packages that are related to this one. 141 00:08:47,640 --> 00:08:51,540 And you can see that they have a special symbol at the front as well. 142 00:08:51,540 --> 00:08:55,560 And we can see that red means that it depends on this package. 143 00:08:55,560 --> 00:08:55,860 Okay. 144 00:08:56,010 --> 00:09:01,320 So the red dot means that the zero aid package depends on these packages. 145 00:09:01,500 --> 00:09:08,430 So that means in order to install zero aid, we need to install all of these packages with red dots 146 00:09:08,430 --> 00:09:09,720 in front of them as well. 147 00:09:09,720 --> 00:09:12,090 If we want zero aid to work. 148 00:09:12,390 --> 00:09:16,920 But the red dot isn't the only symbol that can appear next to a package in the other packages list. 149 00:09:16,950 --> 00:09:19,380 We can see that there are other symbols as well. 150 00:09:19,800 --> 00:09:24,630 So you can see on the key up here that the green diamond next to a package means that zero ID would 151 00:09:24,630 --> 00:09:26,910 recommend you to install another package. 152 00:09:27,150 --> 00:09:28,650 So let's make this a bit more general. 153 00:09:28,650 --> 00:09:31,950 Let's call the package that you want to install, which is our case zero. 154 00:09:31,950 --> 00:09:37,530 And let's call that package a then let's call a random package in the other packages list package B 155 00:09:37,530 --> 00:09:37,850 okay. 156 00:09:37,890 --> 00:09:44,490 So if package A recommends package B, that means that in order for package A to function normally, 157 00:09:44,490 --> 00:09:48,150 we should get package B, but package A will function without it. 158 00:09:48,180 --> 00:09:48,650 Okay. 159 00:09:48,780 --> 00:09:55,470 Then the blue square would say that package A suggested to us another package so recommends means that 160 00:09:55,470 --> 00:09:59,400 it will function without it, but we recommend it for normal use. 161 00:09:59,700 --> 00:10:02,490 Depends means it won't work if you don't get these packages. 162 00:10:02,490 --> 00:10:06,510 Recommends means it will work but not not like how it should. 163 00:10:07,410 --> 00:10:13,260 And the suggest package is just some entirely optional stuff that things you might like to check out. 164 00:10:13,710 --> 00:10:15,810 And the final one is the enhances. 165 00:10:15,810 --> 00:10:21,900 Now, anything with a black dot means that it enhances the current package in some way or another, 166 00:10:21,900 --> 00:10:23,340 maybe through new features. 167 00:10:23,340 --> 00:10:25,020 But again, it's not required. 168 00:10:25,020 --> 00:10:25,320 Okay. 169 00:10:25,470 --> 00:10:32,190 And if we scroll down to the bottom of this page, we can see the sizes, we can see what size the package 170 00:10:32,190 --> 00:10:36,900 is to download, and we can see what size it is when it's uncompressed and installed. 171 00:10:36,900 --> 00:10:42,990 And we can also see what, what the files each package contains, which is useful. 172 00:10:42,990 --> 00:10:47,100 So you can click on there and you can see a list of each of the files that each package contains. 173 00:10:47,570 --> 00:10:51,350 And you can see that there's different packages for different computer architectures. 174 00:10:51,350 --> 00:10:56,540 So for example, if you've got a computer architecture that has an AMD 64 architecture, you can you 175 00:10:56,540 --> 00:10:57,770 would download this one package. 176 00:10:57,770 --> 00:11:03,860 And if you've got one for the three, eight, six computer architecture, you would download this package 177 00:11:04,100 --> 00:11:09,420 and you can see your computer's architecture by opening up your terminal and typing you name Dash. 178 00:11:10,130 --> 00:11:12,050 And we can see that in our virtual machine. 179 00:11:12,050 --> 00:11:20,660 We have the we're running on an x 8664 architecture now amd 64 and x 8664 are the same. 180 00:11:20,660 --> 00:11:25,700 So we would get the AMD 64 packages most appropriate for us here. 181 00:11:26,330 --> 00:11:33,770 Now if you just get x 86, then then you download the 8386 package because that's probably the one most 182 00:11:33,950 --> 00:11:35,780 most appropriate for your computer. 183 00:11:36,020 --> 00:11:39,140 So now you might be thinking, wait a minute, Z, hold on, hold on, hold on. 184 00:11:39,140 --> 00:11:44,660 Are you saying that in order to install software, I first have to search through thousands of packages, 185 00:11:44,660 --> 00:11:47,210 then find out what dependencies it has. 186 00:11:47,210 --> 00:11:53,270 And after that I must ensure that I download all of those different packages and satisfy their dependencies 187 00:11:53,270 --> 00:11:54,680 and so on and so on. 188 00:11:54,680 --> 00:11:58,670 But before I download all of those, I need to make sure that they're all the right version number and 189 00:11:58,670 --> 00:12:01,310 that the packages are appropriate for my computer's architecture. 190 00:12:01,340 --> 00:12:03,290 You have got to be kidding. 191 00:12:04,160 --> 00:12:06,350 Well, that's what I'd be thinking anyway. 192 00:12:06,350 --> 00:12:11,390 But no, the good news is that there's a command line tool installed on your computer that deals with 193 00:12:11,390 --> 00:12:14,510 all of this stuff, and it's called your package manager. 194 00:12:14,510 --> 00:12:19,640 Now, the actual program differs from distribution to distribution, but on a bundle the package manager 195 00:12:19,640 --> 00:12:25,130 is called APT, spelt AP TT, which stands for Advanced Packaging Tool. 196 00:12:25,130 --> 00:12:30,920 And this is what we're going to do use to do all this hard work for us and in the next video you're 197 00:12:30,920 --> 00:12:32,870 going to see how to use it. 198 00:12:34,010 --> 00:12:37,220 But first, let's have a review of what we've learned in this video. 199 00:12:37,220 --> 00:12:42,410 So in this video, you've learned that a software repository is kind of like a library, but for software, 200 00:12:42,500 --> 00:12:44,810 except you don't need to give the software back. 201 00:12:45,020 --> 00:12:50,540 Now, it does differ for other distributions, but in a bundle there are four main software repositories. 202 00:12:50,690 --> 00:12:56,030 So there's the main repository that contains free and open source software that is actively maintained 203 00:12:56,030 --> 00:12:57,740 by the Ubuntu developers. 204 00:12:57,830 --> 00:13:03,020 There's the universe repository that also contains free and open source software, but it's maintained 205 00:13:03,020 --> 00:13:03,920 by the community. 206 00:13:03,920 --> 00:13:05,510 Instead of the Ubuntu developers. 207 00:13:05,660 --> 00:13:11,300 There's the restricted repository that contains proprietary software for device drivers and their software 208 00:13:11,300 --> 00:13:16,310 in this repository is unlikely to be open source, although it might be, but it's not actively maintained 209 00:13:16,310 --> 00:13:17,660 by the Ubuntu developers. 210 00:13:18,680 --> 00:13:23,330 And finally there is the multiverse repository that has software that is limited by copyright or legal 211 00:13:23,330 --> 00:13:23,960 issues. 212 00:13:23,960 --> 00:13:28,310 Again, it's unlikely that the software will be open source in the multiverse repository, but it might 213 00:13:28,310 --> 00:13:33,020 be now with your knowledge about free software, the new project and so on, you can now decide for 214 00:13:33,020 --> 00:13:37,130 yourself whether you will only use free software from the main or universe repositories, whether you're 215 00:13:37,130 --> 00:13:40,640 happy to use the software from the Restricted and multiverse repositories as well. 216 00:13:40,820 --> 00:13:43,130 Ubuntu leaves that choice completely up to you. 217 00:13:43,340 --> 00:13:49,000 Now, when we wanted to see a list of packages available to us, we headed over to packages ubuntu dot 218 00:13:49,040 --> 00:13:52,640 com and a link for that is in the resources section in case you're interested. 219 00:13:52,640 --> 00:13:58,400 And we saw all the packages were opened, were broken up by our distributions code name and you can 220 00:13:58,400 --> 00:14:04,190 see the code name for your distribution by entering the LSB underscore release command with the a option. 221 00:14:04,190 --> 00:14:09,770 And we saw that our command name was artful, but yours might be different depending upon when you downloaded 222 00:14:09,770 --> 00:14:11,510 Ubuntu and when you watch this video. 223 00:14:11,510 --> 00:14:17,390 Now all the packages are organized by a theme or sections and you can see a full list of packages by 224 00:14:17,390 --> 00:14:21,110 scrolling down to the bottom of that page and clicking on the appropriate link. 225 00:14:21,110 --> 00:14:25,280 And each package tells you what repository it comes from in square brackets next to its name. 226 00:14:25,490 --> 00:14:29,270 But if there's no square brackets next to the name, then it comes from the main repository. 227 00:14:29,390 --> 00:14:34,070 And when you click on a package, you'll find that you get more information about it, as well as information 228 00:14:34,070 --> 00:14:36,260 about other packages that are related to it. 229 00:14:36,290 --> 00:14:40,640 Now, some of these packages will be required for that package to run and these are marked with a red 230 00:14:40,640 --> 00:14:46,340 dot and called they are the one packages said to depend upon these packages. 231 00:14:46,340 --> 00:14:51,380 Some will be recommended packages and required for normal functioning and these will be indicated by 232 00:14:51,380 --> 00:14:52,460 green diamonds. 233 00:14:52,460 --> 00:14:57,770 Some will be suggested packages which are they're just for interest and indicated by blue squares. 234 00:14:57,770 --> 00:15:01,130 And some will be called enhance that. 235 00:15:01,130 --> 00:15:05,870 Some will enhance the packages functionality in some way and these will be indicated by black dots. 236 00:15:06,170 --> 00:15:10,730 And finally, we discuss the due to the complexity of managing dependencies and ensuring software has 237 00:15:10,730 --> 00:15:12,950 the correct version number and so on. 238 00:15:13,130 --> 00:15:17,150 Software management is usually done using a program called a package manager. 239 00:15:17,180 --> 00:15:21,500 Now package manager is differ from distribution to distribution, but on Ubuntu, the package manager 240 00:15:21,500 --> 00:15:25,790 is called APT, which stands for Advanced Packaging Tool. 241 00:15:26,270 --> 00:15:30,830 So in the next video you're going to learn how to use the advanced packaging tool to upgrade your system 242 00:15:30,830 --> 00:15:32,330 and search for new software. 243 00:15:32,330 --> 00:15:38,600 Now using a package manager is a critical piece of using a new Linux system, and luckily it's also 244 00:15:38,600 --> 00:15:39,290 super easy. 245 00:15:39,290 --> 00:15:44,210 So for incredible superpowers beyond your wildest dreams, I'll see you in the next video.