CompTIA Linux+ XK0-005 – Unit 05 – Application Management Part 1

  1. Application Management

All right. Now, in this unit, we’re going to talk about applications. Now, probably one of the biggest reasons a lot of people have not made the move to Linux is because it scares them. This idea about how to install software, we’re going to talk about that. We’re going to talk about installing and managing and removing software that’s already been compiled, some of it already put into nice packages. And we’re also going to talk about the part that scares everybody, installing software from what we call source code. And that’s going to be this whole compilation process and a lot of stuff. But you’re going to find out it’s not so secret, it’s not so difficult. On some rare occasions, yeah, it might be a little bit trickier, but it’s well worth the time and the effort it takes to be able to see how easy it is to move programs around, to download programs, how fast it is. Anyway, we’ll get to that topic and then I’ll brag about it and say, don’t be afraid. Here’s how you do it. So that’s our goal, is application management.

  1. Topic A: Packages and Package Managers

So we’re going to deal with application management. We’re going to start off taking the easy road, and that is dealing with packages and package managers. Now, for all of you window people, this is what you’re used to. You’re used to this beautiful thing that says easy installer Microsoft systems installer, install shield. You’re used to packages. You’re used to double clicking something, watching a little bar go across, answer a couple of little questions and boom stuff is there. That’s where we’re going to start. Then we’re going to get into the real nuts and bolts of how to create your installations, your programs, your binaries from the source code. But we’ll start off with packages and let you see that it’s not that scary, not that difficult. And again, you have a lot of flexibility, a lot of options.

  1. Software Distribution Part

So when we talk about software applications or the distribution of it, we have some options. You’ll hear us talk about binaries, source code and packages. So, a binary is a precompiled application, usually compiled to a specific hardware and operating system platform. Now that is something that is unique with Linux that you don’t seeing Windows. And so let me make the comparison again being a good politician, not saying one is better than the other. The reason Windows became so popular is that regardless of the hardware that you had that you were running on, you only had to write your programs to work with windows. Windows, through their use of drivers, would deal with all of the communications and hardware. In other words, you never had direct access to the hardware. You always had to go through Windows.

Now, that made programs that you would write universally available to anybody running Windows.And I mean it. Anybody. Running windows. That’s a good thing. That actually reduces a lot of cost when it comes to the development of software. Now, here’s the politician in Me. There are programs that run better if you can access the hardware directly. And not go through windows. Well, that’s one of the strengths that people like about using the Linux environment. Especially for those of us who do a lot of penetration testing or hacking, if you would, because we want to. Have these programs not be slowed down or affected by the operating system so much as we want to get access to the hardware so we can get better results, better performance, and so you can see those people making those arguments as well. And I’ll keep trying to give you these back and forth if I can.

  1. Softwarre Distribution Part

When we talk about binaries that’s what we mean is that we compiled a program for a specific hardware platform and operating system which means that that program was designed to run on that operating system and has the drivers or the capability of communicating with the hardware that’s there. If I took that binary to a completely different platform, to a completely different system, there’s no guarantee, I’m not saying it won’t work, but there’s no guarantee that it would work on that system. So that’s where source code comes in. Source code is that binary that just hasn’t been turned into a binary. It is an uncompiled program ready to be compiled so that you can include whatever links you need to work with your particular hardware or operating system platform.

Now, here’s where there’s a big strength because I’m not creating this huge package of stuff. It’s really I know this sounds weird, a bunch of text files. I can have this beautiful program fit on a little floppy disk and I mean the old floppy disks that might have needed a CDROM in some Windows environment to get the same results because the source code is just a series of text files. It’s uncompiled code. That means it’s a text file. You bring it in, you compile it. A compiler takes that text, reads through the line, converts it into whatever is necessary to execute as a binary, including your links to all of the information you need for that particular operating system and hardware so that it’s ready to go. That is what we’re going to talk about in our second section is how to do that.

  1. Software Distribution Part

Now another issue we have to be able to make Linux more useful for a lot of people who don’t feel comfortable with that binary and that source code stuff is what we call packages. Now, I don’t mean to make this sound bad at all. Like if you’re using a package, you’re a Wimpy user. I don’t mean it to sound that way. What I’m saying is that for mass marketing, to make it more helpful for people who don’t want to know that level of detail about their operating system. Here’s where packages come in. Precompiled applications delivered in a bundle that can be read and installed by some package manager. So I e in windows.

You might install a package. And you’ve probably seen thisthing saying, install shield. What was it? Do? It asks a couple of questions like what folder do you want to put it into? Some other options extracts everything, make sure it works for that particular operating system, whether it’s Windows Vista or XP or Windows Seven or whatever. We do the same thing with these packages as well. So we can distribute programs and make it very easy for anybody of variety of different platforms and hardware specs to be able to install the software and have it worked. It’s soon as it’s done. So those are the things that we have for the packages so again, it’s just to make life a little easier.

  1. Packages

All right, so as a review, packages then are precompiled applications. Now, they are basically a specialized bundle that has your binary code. It has meta information, which is the information about the package, and a list of dependencies that are going to be needed to be installed again, depending on operating system and hardware and the application itself. There are a couple of different packages, package formats, just as you see in the Windows environments. There’s a debian package format, there’s a Red hat package manager format and many others. Those are probably the two most common that you see. We often publish our packages in this thing called a repository. A repository is just a preselected spot where we store the packages so that when we’re ready to install them or when we’re ready to check for upgrade AIDS, we can go to this location and pull this information down and install it or upgrade whatever we need to do. So it, again, is just designed to make the installation of an application very easy from the perspective of the user.

  1. Package Managers

Now, as I said, there are many different types of packages. There are many, of course, package managers that go with the different types of packages. The one that you’ll probably see a lot of the Rpm is the Red Hat package manager. There’s an apt called the Advanced Packaging Tool. There’s some called Yum. The Yellow Dog modified YaST. Yet another setup tool. One of the things I like about Linux is that they have a sense sense of humor. A lot of these developers, when they’re putting these things together I like that. So anyway, if you’re wondering what on earth are they thinking of? I don’t know.

They’re having fun. Yet another setup tool. Pretty cool idea. All right, so these package managers are tools that we use to basically open the package and begin the installation process. Each has their own command line capability. You need to know what the options are with each of those programs and don’t forget, if you don’t know the options, you can use the word help when you use this command line to see what those options are right in front of you. Maybe some of them even have their own manual page or man page that you can read about how to use each one of these.

  1. Synaptic Package Manager

You also have visual Gui’s that can be used to deal with your packages. So instead of a command line, you could open up something like the Synaptic Package Manager and its job is to help you navigate to where the package is. Choose the package and go through the steps of the installation. It will show you the different sections that you have to answer questions on. Can keep track of the status. You can add in filters, whatever you need to do. You can even check for upgrades. I mean, it’s just like any package management program helping you install a package to your machine.

  1. Demo – Installing a Package via the GUI

All right, we’re going to take a look at installing a package, and I’m going to go to System Administration and look at the Synaptic package Manager. And I’m going to ignore the quick introduction. I’ll let you read that on your own. And what we see here is that we have a list of categories, if you would, about the different types of packages that you could put in there. Some games, desktops graphic information. In fact, Games kind of sound fun. So I’m going to choose click on the Games. And then once you choose a category and all, by the way, is a valid category, just has all of the packages in each category. But once you choose that, then off to the side here, you’re going to see that you have this list of, again, programs or packages inside that category. Now, if you were looking for something and you couldn’t find it, you could click on Search and then just type in the value of what you’re looking for, like in this case Radio. And then you can see a list of all those things that match that particular type of search.

All right, so let me go back to reload here. Let’s just get everything back the way it was, back in the all. And let me click on sections again so that I can get all my options and we’ll go to Games. From here. We’re going to take a look and see what looks like a fun casteoids, I guess the KDE version, I think of Castroids. I don’t know. These are the list of options. I’m going to click Mark, all of those. So when I clicked on it, it actually asked me to mark it. And then it found all of the other components that might be affected. And it’s based on a little widget here. And if I scroll down on this bottom right again here, it is part of the KDE, which is why I got the idea that the K was for the KDE and Asteroids. And from that point, you then come up to the top, click Apply, and you can download just the package files only if you don’t actually want it to be installed.

But I do want it to be installed, so I’m going to click Apply and let it do its download. And when it’s done, it’s installing it. And it says, mark changes are now being applied. Might take a little bit of time, but I doubt it. I can click on little details here so you can actually watch let me bring that screen up. You can actually watch what’s happening at the command line as it’s going through this process of doing the installation. And we’ll just wait to see if everything looks like it’s started and ready to go. All right, looks like the changes were done. So I can close this window down. And just like that, we’ve added a new package. And of course, now most of you probably want me to go play Castroids, but I’ve got to go on and show you some more demos. Anyway, that was the process of enrolling, installing, and how easy it was to be able to do that type of an installation to use the package manager.

  1. Command Line Package Managers

Now, the command lines, as I talked about with some of these packet managers, are different with each one. Help is the best way to get there. But as an example, if we talked about the Apt as the command line, they have what we call the install option. So with Abt, you would use the get option and then say get the package and install it. And then you just have to be able to put in the name of the package the Dpkg command. Again, I for install name of the package, rpm I for install the name of the package. Now, they’re not always going to be exactly the same as those last two. Again, that’s where I would encourage you to use the help commands. Now, you can see a lot of different options with each of these. In fact, you might see sometimes 10, 20, 30 options with each of these command line package managers.

And here I’ve talked about some examples by giving you one. I don’t know that it would be helpful for me to list every single option. And I can’t say that I know each and every one of them by heart, because I too would depend on using Help or the man pages if I wanted to be able to fine tune the installation. And that’s my suggestion to you as well. So rather than my trying to give you 20 or 30 different options for each one of these commands, it’s important to say, look, these are designed to help you install packages through the command line. The nice thing about command line is also a scriptable thing. It’s something you can schedule, it’s something that you can run at a later time or whenever you need to. It makes installation a bit faster, a bit more flexible than using a Gui. You can still use the GUI as well.

  1. Demo – Installing a Package via the Command Line

All right, we are going to use the command line to install a package. Now, one of the things that we’re going to take a look at is the command line, and we’re going to see if we can find out some of the options. So Dpkg is the command line version of the packet manager. I’m going to do the help. Pipe it into the oops. Try that again. Pipe it into the Moore command. And so you can see you have some options like the I to install the name of the package or remove the purge. Get selections. Quite a few things here. Hit the spacebar for the next page, shows you some examples, some other options. So that’s one of the tools that we can use. We can also use this thing called the apptget install, which is another method of running another type of package manager. So there’s lots of, I guess, options is what I’m trying to get at that you can use for this particular part on red hat distributions, you could do Rpm, but I don’t think you’re going to see Rpm here.

Yeah, because it’s not a red hat version. So it just depends on what you’re going to use as far as some options. Well, I am already. Who am I? I think I am the route I am. Let me clear the screen so we can start without any interference. And we’re going to put in this word type of package called Abi, or it’s just going to say Abby Word. So apt get install. And it’s Abby Word is the one we’re going to install. And there it tells you the package. It’s a common grammar plug in, talks about the libraries, the suggested packages, what new things here are going to be installed. And nothing is upgraded. It’s all newly installed pieces of information. And it even tells me how much I’m going to use. So I’m going to say, yes, I want to continue. I’ll hit enter and it’s going to go through and read through the database and do all this work behind the scenes for us to get these packages in there.

And you can see it’s unpacking all of the different components that we need, all of the different libraries that were spelled out when it told us that it was going to do its job. And now updating some of the font files. And here in a bit, we should get a nice little message that lets us know that everything seems to be working just fine. All right. And just like that, we had this new plug in and it wasn’t so bad. Now, if you want to verify it without my actually going out there and starting to run new programs, we saw the Synaptic package manager earlier. Let me open it up. And there is Abby word. I picked one close to the top, so you can see how so you could quickly see that it was, in fact, installed through our process. All right? That was installing a package through the command line editor.

img