Skip to content

Commit 5b75935

Browse files
authored
Merge pull request #24 from livialima/update-day15
Day 15 - updated resources and added apt-cache
2 parents d7f2f2b + 7a2d972 commit 5b75935

1 file changed

Lines changed: 27 additions & 13 deletions

File tree

docs/15.md

Lines changed: 27 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Today however, you'll be looking "under the covers" to see how this works; bette
1616

1717
* Add a new repo
1818
* Remove a repo
19-
* Find out where to get a program from (apt-search)
19+
* Find out where to get a program from (apt search)
2020
* Install a program without apt
2121

2222
## REPOSITORIES AND VERSIONS
@@ -27,11 +27,11 @@ Any particular Linux installation has a number of important characteristics:
2727
* "Bit size" - 32-bit or 64-bit
2828
* Chip - Intel, AMD, PowerPC, ARM
2929

30-
The version number is particularly important because it controls the versions of application that you can install. When Ubuntu 18.04 was released (in April 2018 - hence the version number!), it came out with Apache 2.4.29. So, if your server runs 18.04, then even if you installed Apache with `apt` five years later that is still the version you would receive. This provides stability, but at an obvious cost for web designers who hanker after some feature which later versions provide. (Security patches _are_ made to the repositories, but by "backporting" security fixes from later versions into the old stable version that was first shipped).
30+
The version number is particularly important because it controls the versions of application that you can install. When Ubuntu 18.04 was released (in April 2018 - hence the version number!), it came out with Apache 2.4.29. So, if your server runs 18.04, then even if you installed Apache with `apt` five years later that is still the version you would receive. This provides stability, but at an obvious cost for web designers who hanker after some feature which later versions provide. Security patches _are_ made to the repositories, but by "backporting" security fixes from later versions into the old stable version that was first shipped.
3131

3232
## WHERE IS ALL THIS SETUP?
3333

34-
We'll be discussing the "package manager" used by the Debian and Ubuntu distributions, and dozens of derivatives. This uses the `apt` command, but for most purposes the competing `yum` and `dnf` commands used by Fedora, RHEL, CentOS and Scientific Linux work in a very similar way - as do the equivalent utilities in other versions.
34+
We'll be discussing the "package manager" used by the Debian and Ubuntu distributions, and dozens of derivatives. This uses the `apt` command, but for most purposes the competing `yum` and `dnf` commands used by Red Hat family like RHEL, Fedora, RockyLinux, and CentOS will work in a very similar way - as do the equivalent utilities in other versions.
3535

3636
The configuration is done with files under the _/etc/apt_ directory, and to see where the packages you install are coming from, use `less` to view _/etc/apt/sources.list.d/ubuntu.sources_ where you'll see entries that specify repository URIs, suites, and components for your specific version:
3737

@@ -73,13 +73,24 @@ After adding this, update your local cache of available applications:
7373

7474
`sudo apt update`
7575

76-
Once done, you should be able to install `netperf` like this:
76+
Once done, search the application you're looking for with `apt-cache search netperf`, for example, instead of manually running the dump list. You will see a smaller list with names of packages related and a brief one-line description.
7777

78-
`sudo apt install netperf`
78+
Then just check `netperf` like this:
79+
80+
`apt-cache policy netperf`
7981

8082
...and the output will show that it's coming from Multiverse.
8183

82-
## EXTENSION - Ubuntu PPAs
84+
```bash
85+
netperf:
86+
Installed: (none)
87+
Candidate: 2.7.0-0.1
88+
Version table:
89+
2.7.0-0.1 500
90+
500 http://mirrors.digitalocean.com/ubuntu noble/multiverse amd64 Packages
91+
```
92+
93+
## ADDING OTHER REPOSITORIES
8394

8495
Ubuntu also allows users to register an account and setup software in a Personal Package Archive (PPA) - typically these are setup by enthusiastic developers, and allow you to install the latest "cutting edge" software.
8596

@@ -104,19 +115,22 @@ When you next run "sudo apt upgrade" you'll likely be prompted to install a new
104115

105116
## SUMMARY
106117

107-
Installing only from the default repositories is clearly the safest, but there are often good reasons for going beyond them. As a sysadmin you need to judge the risks, but in the example we came up with a realistic scenario where connecting to an unstable working developer’s version made sense.
118+
Installing only from the default repositories is clearly the safest, but there are often good reasons for going beyond them. As a sysadmin you need to judge the risks, and evaluate if an application justify the use of different packaging managing solutions.
108119

109-
As general rule however you:
120+
As a general rule:
110121

111-
* Will seldom have good reasons for hooking into more than one or two extra repositories
112-
* Need to read up about a repository first, to understand any potential disadvantages.
122+
* Have good reasons for hooking into more than one or two extra repositories; more is not necessarily better.
123+
* Read up about a repository first, to understand any potential disadvantages.
113124

114125
## RESOURCES
115126

116-
* [Package management command comparison](https://wiki.archlinux.org/index.php/Pacman/Rosetta)
117-
* [How to use yum - Introduction](http://fedoranews.org/tchung/howto/2003-11-09-yum-intro.shtml)
118-
* [Package management with APT](https://help.ubuntu.com/community/AptGet/Howto)
119127
* [What do you mean by Free Software?](http://www.debian.org/intro/free)
128+
* [Package management with APT](https://help.ubuntu.com/community/AptGet/Howto)
129+
* [How to use apt-cache](https://itsfoss.com/apt-cache-command/)
130+
* [How to use dpkg](https://www.geeksforgeeks.org/linux-unix/debian-software-package-managementdpkg-in-linux/)
131+
* [Package management command comparison](https://wiki.archlinux.org/index.php/Pacman/Rosetta)
132+
* [How to use snap](https://snapcraft.io/docs/tutorials/get-started/)
133+
* [How to use flatpak](https://docs.flatpak.org/en/latest/using-flatpak.html)
120134

121135
Some rights reserved. Check the license terms
122136
[here](https://github.com/livialima/linuxupskillchallenge/blob/master/LICENSE)

0 commit comments

Comments
 (0)