 Software is installed in Ubuntu Linux using a package management solution called apt. Similar to an app store, software is downloaded from a central server and installed with all the dependencies automatically managed, making it much simpler for the user. You can install software other ways, but it's very common to use a package manager. apt is the name. In fact, the command use is primarily apt-get, although recently in the last couple of years, a higher-level command called apt has become more common, but you'll see in many instructions apt-get. apt-get has a number of options to see some of them. If you write apt-get help, you'll see the most used commands there. So to update, upgrade, install, to install packages, and so on. apt is very similar and in most cases, you can replace apt-get with simply apt, and it also has a help. Many of the websites which give instructions will use the older apt-get, but you can use the newer apt if you like. Again, it has the install command to install packages, remove, update is very common to update the list of packages on the system, so your system is aware of what's available. Upgrade is to upgrade the existing ones and some ways to list and to show details of current packages. So let's see it in use. We'll use apt for this example. First, let's install something. That's a common thing we want to do. We use apt install, we use install command, and we need to know the name of the software that we want, the package specifically. One of them I know is TCP dump. And apt install TCP dump says some error cannot open lock file, permission denied is the key part there. Typically to install software, you need to be the administrator, you need to have pseudo-privileges, and our user has pseudo-privileges, we can proceed the command with pseudo and try again and ask my password for the first time. And what has it done? So it's worked this time. It's looked and found that there is a package called TCP dump. It's found that it has a dependency called libpcap 0.8. So in order to install TCP dump, it must install the dependency and it will automatically do that for you. So it's going to install two packages here. And it's given you some information about how much and do you want to continue? Yes, I want to continue. And it goes away and downloads those packages from a server. We'll see where shortly and installs them. And that's done. So now TCP dump is installed along with all its dependencies. We can remove packages, simply using the remove command, but note it was the following package was also automatically installed libpcap. It's only going to remove TCP dump. Let's say no to that. And let's try the other command auto remove. Here it recognizes that TCP dump installed a dependency libpcap. So with auto remove, it's going to remove TCP dump and the dependency. And it does a check to make sure that dependency is not used by other software. So yes, we'll remove TCP dump. So we can install, remove and auto remove. Another thing we do with regarding the existing software in the system is that we'll often want to update it. New versions become available. And really there's two steps that you should do to do that. First, you update the list of packages on your system, using the update command. And that downloads from the server, the list of packages, so that it's got an update view and it knows all the latest versions. And now we can upgrade with the upgrade command. And note it's recognized this whole list of packages that can be upgraded and will be upgraded if we choose yes to continue. And that's going to use up another 164, 165 meg of disk space. So this is a common step to update your package list and then upgrade if you want to keep your software up to date. And just to save time, I'll say no, not to install that. Otherwise it would have gone through the process of installing all of those packages and getting all the dependencies. It's good practice to do the update followed by the upgrade on a regular basis, but be aware that doing upgrades of software needs some thought whether it's necessary to do the upgrade and whether it's gonna have an impact on other services. Going back to the help, we can list and search and show to find information about packages. For example, show information about packages we know about TCP done and it shows something about that package. And if I scroll up, the package, the particular version, so the details about the maintainers, the installed size, the dependencies, so it requires these packages to work. They may be already installed, so we'll check that for you and some description of the package. So if you want to see more details of package you can use show. You can list packages, list all the packages which start with TCP, for example, including TCP dump in that case. So to see the packages not just installed, but out of the entire set of packages, if you know the starting part of the name or no part of it, you can use app list. You can also use app search and that will take longer because that search is not just through the names, but through the details of the package descriptions, for example, and gives us anything that mentions TCP in that case. The app is used for installing software, managing software packages. You may see instructions using apt-get and almost in most cases you'll use that it's identical. You can replace apt-get with simply apt and vice versa. So where do all these software packages come from? There's a server that your system is pointed to and it will download from there. So we can see some of those details. There's a configuration file. If we look in, if we use less to view the file, it's a text file and I'll use the option line numbers. So it's just a little bit easier to refer and the file is in the etc directory, apt and sources.list is the name of the file. And this points to the server where you'll download the package information and the actual packages. So showing the line numbers along the left, noting that everything that starts with a hash character is a comment. So some of those things are commented out but line nine contains some information saying that the server giving the address au.archive.ubuntu.com. slash ubuntu is the location where the packages would be downloaded from. And it refers to the version of Ubuntu you're using and there's different repositories. Ubuntu has four different groupings of all the packages and this one saying you can get the main and restricted packages from this website. There may be some other options. For example, if you wanna get updates to this version, some may say may see lines like deb source if you want to be able to download the source code of those packages as well. So this server, what is it? What does it contain? Let's have a look. And in our web browser, go to Firefox and type in the address. And in this case, it actually points to the ARNET mirror. So across the world, there are many different package servers and normally when your system is installed, you will choose a default one based upon the country, in this case in Australia and this one's pointing to ARNET mirror. You can change this by editing that sources.list file. Inside here under the archives directory is the all the package information and particular under pool is where you find the actual packages and the four categories of packages are main, multiverse, restricted and universe and they're described by Ubuntu. The main are the main ones which Canonical support. Canonical is the company that provides Ubuntu. Restricted, if we saw in our sources.list, main and restricted were listed. Restricted contains packages, again usually kind of canonical check but they're proprietary. They may not be source code but usually needed for drivers like WiFi, possibly some codecs and so on. Universe is a community maintained software which is not supported by Canonical but may contain other software that's useful and multiverse may be additional software which may be questionable in terms of copyright or legal issues in different jurisdictions. If you go into here, you can see that they essentially have all the packages, the group by letter and when you run out in store, it will download the particular version from here. This one has no GCC, we'd need to find one of the latest version and we should find, let's say, GConfEvidence Editor. Find the one we tried, TCP dump and we'll talk about that. Okay, we've found the packages. The other ones may not be there because they may be linking to other names. So they may be the common names but the actual name are different. I was unlucky. TCP dump, the packages are here, the different versions, for example, the .deb files are the packages and the different hardware, the AMD64 I386 versions. There's also the source, the .tart, .gz is the source and some other configuration files for TCP dump. So back to our sources.list file. If you wanted to change this one way, you can change the server, you can find another server and you can edit this sources.list file. But normally the default server is probably the best one or satisfactory.