1 00:00:00,090 --> 00:00:04,590 So in the last few videos we've been learning a whole lot about our package manager and how it works, 2 00:00:04,590 --> 00:00:08,670 and we learned about the cash and what it's for, and we've learned about how to update the cash. 3 00:00:08,670 --> 00:00:13,110 And I had to upgrade all of the software on our system to the newest versions using the package manager, 4 00:00:13,110 --> 00:00:18,000 which is all super awesome stuff, but how can we install new packages? 5 00:00:18,000 --> 00:00:19,050 That's what we want to know. 6 00:00:19,050 --> 00:00:23,220 Well, with the background that you've gained from the previous videos, installing will now be really 7 00:00:23,220 --> 00:00:26,220 easy to understand and not just something that you have to memorize. 8 00:00:26,220 --> 00:00:31,110 And by the end of this video you will know how to install new software from the command line. 9 00:00:31,110 --> 00:00:33,720 So let's go ahead and jump right into it. 10 00:00:35,080 --> 00:00:35,420 Okay. 11 00:00:35,470 --> 00:00:39,670 So now that we know that our cash and system are fully up to date, let's go ahead and install some 12 00:00:39,670 --> 00:00:40,460 new software. 13 00:00:40,480 --> 00:00:43,780 So let's say that I've heard of a program called XYZ. 14 00:00:43,780 --> 00:00:48,430 And XYZ apparently makes a window with some funny eyes pop up that follow your mouse cursor around the 15 00:00:48,430 --> 00:00:48,760 screen. 16 00:00:48,760 --> 00:00:51,730 And I think this is interesting and I want to install it, so do that. 17 00:00:51,730 --> 00:00:54,610 First, we need to know what package the XYZ program comes in. 18 00:00:54,610 --> 00:00:56,050 So let's search the cache for it. 19 00:00:56,080 --> 00:01:01,630 The way that we do that is we do APT cash search for XYZ and it will give us every package that has 20 00:01:01,630 --> 00:01:02,710 something to do with XYZ. 21 00:01:02,710 --> 00:01:07,870 And we've heard of this package called X 11 apps, let's say, and we like Ah, that's the one I've 22 00:01:07,870 --> 00:01:08,200 heard of. 23 00:01:08,200 --> 00:01:10,060 Let me go and have a closer look at it. 24 00:01:10,060 --> 00:01:15,010 So what we do, we do apt cash show x 11 apps. 25 00:01:15,370 --> 00:01:19,300 So you give it the name of the package here and that will give us a bunch of information. 26 00:01:19,300 --> 00:01:21,490 But let's just clear the screen and pipe that through less. 27 00:01:21,490 --> 00:01:23,500 So we get a bit of a closer look. 28 00:01:23,500 --> 00:01:23,980 Okay. 29 00:01:24,070 --> 00:01:28,510 And when we open this here, we can see that actually we get a lot of information about the package. 30 00:01:28,510 --> 00:01:33,280 But down here in the description, it says that this package provides a miscellaneous assortment of 31 00:01:33,280 --> 00:01:39,250 X applications that shipped with the X Window System, including and it all tell us that we've got something 32 00:01:39,280 --> 00:01:45,250 tools for manipulating bitmap images, something for a tool that tells you when you have new email and 33 00:01:45,250 --> 00:01:45,610 so on. 34 00:01:45,610 --> 00:01:47,980 And then there's a one here called X Ise. 35 00:01:47,980 --> 00:01:52,360 And XYZ is a demo program in which a pair of eyes track the pointer. 36 00:01:52,360 --> 00:01:54,070 So that's what we want. 37 00:01:54,070 --> 00:01:55,840 And we realize that actually we want to have a look at this. 38 00:01:55,840 --> 00:02:01,420 There's also another one called X Man, which is a manual page browser which might be useful as well. 39 00:02:01,450 --> 00:02:01,760 Okay. 40 00:02:01,810 --> 00:02:05,320 So now we're pretty convinced we want to install the X 11 apps package. 41 00:02:05,320 --> 00:02:06,310 How can we do that? 42 00:02:06,310 --> 00:02:07,780 Well, it's actually really easy. 43 00:02:07,780 --> 00:02:12,010 All we've got to do if we get out of less is just when we clear the screen. 44 00:02:12,010 --> 00:02:18,430 All we have to do if type sudo apt get install x 11 apps. 45 00:02:18,430 --> 00:02:19,900 So we just enter the name of the package. 46 00:02:19,900 --> 00:02:26,380 Now notice that we're using apt get again to install the package because we want our package manager 47 00:02:26,380 --> 00:02:30,190 to get data from the internet and not just from the local cache. 48 00:02:30,190 --> 00:02:36,250 And we also pass the package name that we want to install which and because we want to install X 11 49 00:02:36,250 --> 00:02:38,140 apps, we typed x 11 apps in there. 50 00:02:38,140 --> 00:02:43,420 Now when we press enter, we see that it'll ask for our password, which we enter, and then the package 51 00:02:43,420 --> 00:02:49,390 manager is going to go ahead and install the new packages with any dependencies that are actually required. 52 00:02:49,390 --> 00:02:53,110 Now sometimes it might ask for your permission if it needs to install a lot, but because it's only 53 00:02:53,110 --> 00:02:57,400 installing about 600 kilobytes, it was like, Yeah, let me just go ahead and install it then. 54 00:02:57,430 --> 00:02:59,710 I don't need to ask for permission for something that's so small. 55 00:02:59,740 --> 00:03:01,390 Okay, but there's nothing we need to do. 56 00:03:01,390 --> 00:03:04,630 The package is installed and it's as simple as that. 57 00:03:04,630 --> 00:03:09,130 Now X11 Apps is a pre compiled package, also known as a binary package. 58 00:03:09,130 --> 00:03:14,590 Now most packages are binary packages, which means that the code that make the software has been pre 59 00:03:14,590 --> 00:03:16,450 compiled and ready to go beforehand. 60 00:03:16,450 --> 00:03:17,470 So you don't have to do any of that. 61 00:03:17,470 --> 00:03:21,790 Configure, make and make install stuff that we did a few videos ago yourself. 62 00:03:21,790 --> 00:03:24,670 Okay, just install the package from the repositories and you're done. 63 00:03:24,670 --> 00:03:29,230 And what's better, the package will also be tracked for updates so you can update the package if new 64 00:03:29,230 --> 00:03:30,340 updates are made available. 65 00:03:30,370 --> 00:03:32,020 How awesome is that? 66 00:03:32,410 --> 00:03:34,300 Now let's try out our new software. 67 00:03:34,300 --> 00:03:36,640 So we wanted to use the Xs program. 68 00:03:36,640 --> 00:03:43,120 So if we just click the screen and type X I's in there and press enter, we'll see that we get these 69 00:03:43,120 --> 00:03:46,540 funny googly eyes pop up on the screen that follow our mouse around. 70 00:03:46,540 --> 00:03:49,330 So if I put the mouse down here or was it gone? 71 00:03:49,390 --> 00:03:50,530 I scared away the eyes. 72 00:03:50,530 --> 00:03:52,510 If I pop him up here, then it will follow around. 73 00:03:54,040 --> 00:03:58,000 Probably not as fluidly as I'd like, but I'm going to put that down to us running this in a virtual 74 00:03:58,000 --> 00:03:58,390 machine. 75 00:03:58,390 --> 00:04:02,770 But if like, you know, it does follow it a whole lot nicer, but that's pretty cool right now. 76 00:04:02,770 --> 00:04:08,200 The awesome thing is the way that you everything you install will come with its own man page. 77 00:04:08,200 --> 00:04:16,870 So if I just close XYZ here, then if I do man XYZ, you'll see that it's actually now also got a manual 78 00:04:16,870 --> 00:04:22,630 page installed and it says a follow the mouse x demo and it's also got some options so you can even 79 00:04:22,630 --> 00:04:25,990 control the XYZ program from the command line. 80 00:04:25,990 --> 00:04:30,490 And we can see here that there is a there is an option here called center, which allows you to choose 81 00:04:30,490 --> 00:04:32,440 a different color for the center of the eyes. 82 00:04:32,440 --> 00:04:37,900 So, for example, if we do X eyes, then give it the center option and tell it. 83 00:04:38,080 --> 00:04:40,840 I think it's two dashes center blue. 84 00:04:41,380 --> 00:04:41,620 Whoops. 85 00:04:41,620 --> 00:04:41,800 Nope. 86 00:04:41,800 --> 00:04:42,580 Maybe just one. 87 00:04:42,730 --> 00:04:43,720 Maybe just one dash. 88 00:04:44,080 --> 00:04:44,770 There we go. 89 00:04:44,770 --> 00:04:46,480 Now, the center of the eyes is blue. 90 00:04:46,480 --> 00:04:51,910 And but I want I want you to notice here is the way that look, when you open the Xs program graphically, 91 00:04:52,390 --> 00:04:54,700 you don't have the option to change the color of the eyes. 92 00:04:54,700 --> 00:04:55,150 Right? 93 00:04:55,150 --> 00:04:58,480 But from the command line, you can change that and a whole lot more. 94 00:04:58,480 --> 00:05:02,980 So this is highlighting for you just how powerful the command line is and how it does give you more 95 00:05:02,980 --> 00:05:06,430 abilities than is possible with a graphical editor. 96 00:05:06,430 --> 00:05:11,680 And if you can't edit the color of googly eyes, then tell me what really is the point of having a computer? 97 00:05:12,250 --> 00:05:17,890 Now the X11 apps package came with quite a few other pieces of software inside, one of which is called 98 00:05:17,890 --> 00:05:19,900 X Man, which you might find useful. 99 00:05:19,930 --> 00:05:23,500 Now X Man is a graphical window for looking at the manual pages. 100 00:05:23,500 --> 00:05:31,690 So if we get rid of XYZ here and close it and then we type X man, we'll see a window pop up over here. 101 00:05:31,690 --> 00:05:34,180 Now you can search the man pages using. 102 00:05:34,330 --> 00:05:38,230 So if we click on manual page right there, it'll open up a bigger window. 103 00:05:38,230 --> 00:05:45,370 And if we click on the on the options at the top here, if we hold down the mouse button, it shows 104 00:05:45,370 --> 00:05:45,670 the menu. 105 00:05:45,670 --> 00:05:48,850 So you need to hold down the mouse button and you'll see this dropdown menu. 106 00:05:48,850 --> 00:05:54,850 Then if you go on search and let go of the mouse, that is if we've clicked the search thing and now 107 00:05:54,850 --> 00:05:56,110 we can search for something in here. 108 00:05:56,110 --> 00:06:01,300 So this is, for example, if we take a look at RLS and we try to look at it as a manual page, then 109 00:06:01,300 --> 00:06:04,750 it will open up the RLS manual page and you can browse through it here. 110 00:06:04,750 --> 00:06:12,010 So this is a more, I guess, graphical way of taking a look at the manual pages than you do with the 111 00:06:12,010 --> 00:06:12,610 command line. 112 00:06:12,610 --> 00:06:14,770 But I guess it just makes it look a bit prettier. 113 00:06:14,770 --> 00:06:19,420 And you can also look at the sections so you can look in user commands and you can see all of the user 114 00:06:19,420 --> 00:06:20,170 commands here. 115 00:06:20,170 --> 00:06:25,330 And if I wanted to look at, let's say, the the address to Line Command, I'll just click on that and 116 00:06:25,330 --> 00:06:25,930 it will open up. 117 00:06:25,930 --> 00:06:28,420 So it's a nice graphical way of browsing through the manual. 118 00:06:28,420 --> 00:06:31,480 So that's something that you can play around with if you like. 119 00:06:31,480 --> 00:06:37,360 And one thing I also want to highlight is how we by installing one package, the X 11 apps package, 120 00:06:37,360 --> 00:06:41,050 we've actually installed multiple different pieces of software, which is super cool. 121 00:06:41,050 --> 00:06:43,930 And we didn't have to do any compiling, we didn't have to do any configuring. 122 00:06:43,930 --> 00:06:52,060 All we have to do is make sure that our package list was up to date using sudo apt get update and then 123 00:06:52,180 --> 00:06:56,200 all we had to do then was just pseudo apt get install and then a package name and that's it. 124 00:06:56,200 --> 00:07:01,210 We can we can rest assured that we've got the most up to date version of that package and it's all, 125 00:07:01,420 --> 00:07:02,020 it's all sorted. 126 00:07:02,020 --> 00:07:05,950 We didn't even have to find out if the package was suitable for our computer's architecture and decide 127 00:07:05,950 --> 00:07:13,600 between, you know, i386 or AMD 64 that was all catered for automatically, which is awesome, but 128 00:07:13,600 --> 00:07:15,970 all of the software in that package was pre compiled. 129 00:07:15,970 --> 00:07:20,590 So what if we wanted to utilize the freedoms that free software gives us and access the source code 130 00:07:20,590 --> 00:07:21,940 for a package and modify it? 131 00:07:22,210 --> 00:07:26,560 Well, accessing the source code from the repositories is also very easy, but there are a few edits 132 00:07:26,560 --> 00:07:27,640 that you need to make. 133 00:07:27,640 --> 00:07:29,440 So for all that freedom, goodness. 134 00:07:29,440 --> 00:07:31,390 I'll see you in the next video.