> For the complete documentation index, see [llms.txt](https://predator-os.gitbook.io/predator-os-beginner-guide-book/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://predator-os.gitbook.io/predator-os-beginner-guide-book/chapter-8.md).

# Chapter 8

![](/files/ZmAB4LXcfd0NzG231qcp)

### Chapter 8 <a href="#toc171120079" id="toc171120079"></a>

### Post installation <a href="#toc171120080" id="toc171120080"></a>

### After the First Boot <a href="#toc171120081" id="toc171120081"></a>

### Maintenance and Updates: The APT Tools <a href="#toc171120082" id="toc171120082"></a>

APT is the abbreviation for Advanced Packaging Too&#x6C;**.** What makes this program **“**&#x61;dvance&#x64;**”** is its approach to package&#x73;**.** It does not simply evaluate them individuall&#x79;**,** but it considers them as a whole and produces the best possible combination of packages depending on what is available and compatible according to dependencie&#x73;**.**

You can also update Predato&#x72;**-**&#x4F;S using the termina&#x6C;**.**

Press CTR&#x4C;**+**&#x41;L&#x54;**+**&#x54; to bring up a Terminal windo&#x77;**.**

Then type the followings comman&#x64;**:**

**$**&#x73;udo apt update

Or

**$**&#x75;p

### Mange the sources.list <a href="#toc171120083" id="toc171120083"></a>

A first apt upgrade **(**&#x61; command used to automatically update installed program&#x73;**)** is generally require&#x64;**,** especially for possible security updates issued since the release of the latest PredatorOS stable versio&#x6E;**.**

Befor updating and upgrading the Predato&#x72;**-**&#x4F;&#x53;**:**

The Predato&#x72;**-**&#x4F;S used the full repository of Debian stable 2&#x30;**.**&#x30;4 by defaul&#x74;**.**&#x79;ou can see the list of repositories in the following pat&#x68;**:**

**/etc/apt/sources.list**

![](/files/0TWerfZPORMa80QaVlXM)

Each active line in the **/etc/apt/sources.list** file represents a package source **(**&#x72;epositor&#x79;**)** and is made of at least three parts separated by space&#x73;**.**

You can manage the repositories by adding or removing line&#x73;**.** source&#x73;**.**&#x6C;ist management by GUI tool&#x73;**:**

method1 **:**&#x79;ou can manage the repositories by typing the following comman&#x64;**:**

**$**&#x73;udo softwar&#x65;**-**&#x70;ropertie&#x73;**-**&#x71;t

![](/files/lfu35a4wcNAPInBhtOhh)

method&#x32;**:** you can manage the repositories by Synaptic too&#x6C;**.**

![](/files/bbatYeShT71rJiTVl2zZ)

Debian stable sources list in Predato&#x72;**-**&#x4F;S

\##Debian 12.5 bookworm version

deb <http://deb.debian.org/debian/> bookworm non-free-firmware non-free contrib main

deb-src <http://deb.debian.org/debian/> bookworm non-free-firmware non-free contrib main

deb <http://deb.debian.org/debian-security/> bookworm-security non-free-firmware non-free contrib main

deb-src <http://deb.debian.org/debian-security/> bookworm-security non-free-firmware non-free contrib main

deb <http://deb.debian.org/debian/> bookworm-updates non-free-firmware non-free contrib main

deb-src <http://deb.debian.org/debian/> bookworm-updates main contrib non-free non-free-firmware

deb <https://deb.debian.org/debian/> bookworm-proposed-updates contrib main non-free non-free-firmware

deb-src <https://deb.debian.org/debian/> bookworm-proposed-updates contrib main non-free non-free-firmware

**Own Predator-os source list**

deb \[arch=amd64] <https://www.seilany.ir/predator-os/predator-updater-ppa> ./

### Upgrading the System <a href="#toc171120084" id="toc171120084"></a>

### Apt or apt-get <a href="#toc171120085" id="toc171120085"></a>

APT is a vast projec&#x74;**,** whose original plans included a graphical interfac&#x65;**.** It is based on a library which contains the core applicatio&#x6E;**,** and **apt-get** is the first front end — comman&#x64;**-**&#x6C;ine based — which was developed within the projec&#x74;**.** **apt** is a second comman&#x64;**-**&#x6C;ine based front end provided by APT which overcomes some design mistakes of **apt-get.**

Both tools are built on top of the same library and are thus very clos&#x65;**,** but the default behavior of **apt** has been improved for interactive use and to actually do what most users expec&#x74;**.** The APT developers reserve the right to change the public interface of this tool to further improve i&#x74;**.** Conversel&#x79;**,** the public interface of **apt-get** is well defined and will not change in any backwards incompatible wa&#x79;**.** It is thus the tool that you want to use when you need to script package installation request&#x73;**.**

Numerous other graphical interfaces then appeared as external project&#x73;**:** **synaptic,** **aptitude** **(**&#x77;hich includes both a text mode interface and a graphical one — even if not complete ye&#x74;**),** **wajig,** et&#x63;**.** The most recommended interfac&#x65;**,** **apt,** is the one that we will use in the examples given in this sectio&#x6E;**.** Not&#x65;**,** howeve&#x72;**,** that **apt-get** and **aptitude** have a very similar command line synta&#x78;**.** When there are major differences between these three command&#x73;**,** these will be detaile&#x64;**.**

Type i&#x6E;**:**

sudo apt update

or use pr&#x65;**-**&#x64;efinded alias comman&#x64;**:**

**$**&#x75;p

You will be prompted to enter your login passwor&#x64;**.**

### System Upgrade <a href="#toc171120086" id="toc171120086"></a>

Regular upgrades are recommende&#x64;**,** because they include the latest security update&#x73;**.** To upgrad&#x65;**,** use **apt upgrade,** **apt-get upgrade** or **aptitude safeupgrade** **(**&#x6F;f course after **apt update).** This command looks for installed packages which can be upgraded without removing any package&#x73;**.** In other word&#x73;**,** the goal is to ensure the least intrusive upgrade possibl&#x65;**.** **apt-get** is slightly more demanding than **aptitude** or **apt** because it will refuse to install packages which were not installed beforehan&#x64;**.**

**apt** will generally select the most recent version number **(**&#x65;xcept for packages from Experimental and stabl&#x65;**-**&#x62;ackport&#x73;**,** which are ignored by default whatever their version numbe&#x72;**).**

To tell **apt** to use a specific distribution when searching for upgraded package&#x73;**,** you need to use the **-t** or **--target-release** optio&#x6E;**,** followed by the name of the distribution you wan&#x74;**.** To avoid specifying this option every time you use **apt.** For more important upgrade&#x73;**,** such as the change from one major version to the nex&#x74;**,** you need to use **apt full-upgrade.** With this instructio&#x6E;**,** **apt** will complete the upgrade even if it has to remove some obsolete packages or install new dependencie&#x73;**.**

Unlike **apt** and **aptitude,** **apt-get** does not know the **full-upgrade** comman&#x64;**.** Instea&#x64;**,** you should use **apt-get dist-upgrade** **(“**&#x64;istribution upgrad&#x65;**”),** the historical and wel&#x6C;**-**&#x6B;nown command that **apt** and **aptitude** also except for the convenience of users who got used to i&#x74;**.** The results of these operations are logged into **/var/log/apt/history.log** and **/var/log/apt/term.log,** whereas **dpkg** keeps its log in a file called **/var/log/dpkg.log.**

This will check for updates and tell you if there are any that need applyin&#x67;**.** To apply any updates typ&#x65;**:**

sudo apt dis&#x74;**-**&#x75;pgrade

or use pr&#x65;**-**&#x64;efinded alias comman&#x64;**:**

**$**&#x75;g

### Unattended Upgrades unattended-upgrades <a href="#toc171120087" id="toc171120087"></a>

The purpose of[ unattende&#x64;**-**&#x75;pgrades ](https://packages.debian.org/unattended-upgrades)is to keep the computer current with the latest security **(**&#x61;nd othe&#x72;**)** updates automaticall&#x79;**.**

If you plan to use i&#x74;**,** you should have some means to monitor your systems such as installing the[ ap&#x74;**-**&#x6C;istchanges ](https://packages.debian.org/apt-listchanges)package and configuring it to send you emails about update&#x73;**.** And there is always **/**&#x76;a&#x72;**/**&#x6C;o&#x67;**/**&#x64;pk&#x67;**.**&#x6C;o&#x67;**,** or the files in **/**&#x76;a&#x72;**/**&#x6C;o&#x67;**/**&#x75;nattendedupgrade&#x73;**/.**

Linux server security is of critical importance to sysadmin&#x73;**.** One central part of keeping Linux servers secure is by installing security updates promptl&#x79;**.** Too ofte&#x6E;**,** there are compromised servers on the internet due to pending security updates waiting for a manual updat&#x65;**.** On both Debian stable and Debia&#x6E;**,** the unattended-upgrades package can be configured to perform unattende&#x64;**-**&#x75;pgrades to install updated packages and security updates automaticall&#x79;**.**

Remembe&#x72;**,** you will want to monitor updates and changes to your Linux server over tim&#x65;**.** You can monitor via **/var/log/dpkg.log** or read the log files in **/var/log/unattended-upgrades/.** You can also monitor changes by installing the[ ap&#x74;**-**&#x6C;istchanges ](https://manpages.debian.org/buster/apt-listchanges/apt-listchanges.1.en.html)package **(**&#x6F;ptiona&#x6C;**).**

sudo apt install ap&#x74;**-**&#x6C;istchanges

ap&#x74;**-**&#x67;et install unattende&#x64;**-**&#x75;pgrades ap&#x74;**-**&#x6C;istchanges sudo dpk&#x67;**-**&#x72;econfigure unattende&#x64;**-**&#x75;pgrades he ap&#x74;**-**&#x6C;istchanges can be configured to send emails about update change&#x73;**.** ap&#x74;**-**&#x6C;istchanges is a tool to show what has been changed in a new version of a Debian package compared to the version currently installed on the syste&#x6D;**.** It does this by extracting the relevant entries from the NEW&#x53;**.**&#x44;ebian and changelog\[**.**&#x44;ebian] file&#x73;**,** usually found in **/**&#x75;s&#x72;**/**&#x73;har&#x65;**/**&#x64;o&#x63;**/***package***,** from Debian package archive&#x73;**.** On both Debian and Debian stabl&#x65;**,** as Debian stable is a derivative of Debia&#x6E;**.**

![](/files/OWy9Zjy3OcciDuO2X2tS)

![](/files/BtpVWDwKdslgf9D46yuM)

### The apt-cache Command <a href="#toc171120088" id="toc171120088"></a>

The **apt-cache** command can display much of the information stored in AP&#x54;**’**&#x73; internal databas&#x65;**.** This information is a sort of cache since it is gathered from the different sources listed in the **sources.list** fil&#x65;**.** This happens during the **apt update** operatio&#x6E;**.**

Configuration Options

Besides the configuration elements already mentione&#x64;**,** it is possible to configure certain aspects of APT by adding directives in a file of

#### the /etc/apt/apt.conf.d/ directory or /etc/apt/apt.conf itself <a href="#toc171120089" id="toc171120089"></a>

### Installing Additional Software <a href="#toc171120090" id="toc171120090"></a>

The installed packages correspond to the profiles selected during installatio&#x6E;**,** but not necessarily to the use that will actually be made of the machin&#x65;**.** As suc&#x68;**,** you might want to use a package management tool to refine the selection of installed package&#x73;**.** The two most frequently used tools are apt **(**&#x61;ccessible from the command lin&#x65;**)** and synaptic **(“**&#x53;ynaptic Package Manage&#x72;**”** in the menu&#x73;**).**

### Manipulating Packages with dpkg: <a href="#toc171120091" id="toc171120091"></a>

dpkg is the base command for handling Debian packages on the syste&#x6D;**.** If you have **.**&#x64;eb package&#x73;**,** it is dpkg that allows installation or analysis of their content&#x73;**.** it knows what is installed on the syste&#x6D;**,** and whatever it is given on the command lin&#x65;**,** but knows nothing of the other available package&#x73;**.** As suc&#x68;**,** it will fail if a dependency is not me&#x74;**.** Tools such as apt and aptitud&#x65;**,** on the contrar&#x79;**,** will create a list of dependencies to install everything as automatically as possibl&#x65;**.** Installing Packages dpkg i&#x73;**,** above al&#x6C;**,** the tool for installing an already available Debian package **(**&#x62;ecause it does not download anythin&#x67;**).** To do thi&#x73;**,** we use its **-**&#x69; or **--**&#x69;nstall optio&#x6E;**.**

**$**&#x73;udo dpkg **-**&#x69; myfil&#x65;**.**&#x64;eb

### Frontends: aptitude, synaptic <a href="#toc171120092" id="toc171120092"></a>

APT is a &#x43;**++** program whose code mainly resides in the **libapt-pkg** shared librar&#x79;**.** Using a shared library facilitates the creation of user interfaces **(**&#x66;rontend&#x73;**),** since the code contained in the library can easily be reuse&#x64;**.** Historicall&#x79;**,** **apt-get** was only designed as a test frontend for **libapt-pkg** but its success tends to obscure this fac&#x74;**.** aptitude

**aptitude** is an interactive program that can be used in sem&#x69;**-**&#x67;raphical mode on the consol&#x65;**.** You can browse the list of installed and available package&#x73;**,** look up all the available informatio&#x6E;**,** and select packages to install or remov&#x65;**.** The program is designed specifically to be used by administrators, so that its default behaviors are designed to be much more intelligent than **apt-get’**&#x73; and its interface much easier to understan&#x64;**.**

![](/files/DN2TIG7uWaDXSrVCshnY)

### The aptitude package manager <a href="#toc171120093" id="toc171120093"></a>

When it start&#x73;**,** **aptitude** shows a list of packages sorted by state **(**&#x69;nstalle&#x64;**,** noninstalle&#x64;**,** or installed but not available on the mirrors — other sections display task&#x73;**,** virtual package&#x73;**,** and new packages that appeared recently on mirror&#x73;**).** To facilitate thematic browsing other views are availabl&#x65;**.** In all case&#x73;**,** **aptitude** displays a list combining categories and packages on the scree&#x6E;**.** Categories are organized through a tree structur&#x65;**,** whose branches can respectively be unfolded or closed with the **Enter,** **\[** and **]** key&#x73;**.** **+** should be used to mark a package for installatio&#x6E;**,** **-** to mark it for removal and **\_** to purge it **(**&#x6E;ote that these keys can also be used for categorie&#x73;**,** in which case the corresponding actions will be applied to all the packages of the categor&#x79;**).** **u** updates the lists of available packages and **Shift+u** prepares a global system upgrad&#x65;**.** **g** switches to a summary view of the requested changes **(**&#x61;nd typing **g** again will apply the change&#x73;**),** and **q** quits the current vie&#x77;**.** If you are in the initial vie&#x77;**,** this will effectively close **aptitude.**

**Synaptic**

![](/files/a1bS1lcGyzAzNuj9r1Ol)**synaptic** is a graphical package manager which features a clean and efficient graphical interface based on GT&#x4B;**+/**&#x47;NOM&#x45;**.** Its many read&#x79;**-**&#x74;&#x6F;**-**&#x75;se filters give fast access to newly available package&#x73;**,** installed package&#x73;**,** upgradable package&#x73;**,** obsolete packages and so o&#x6E;**.** If you browse through these list&#x73;**,** you can select the operations to be done on the packages **(**&#x69;nstal&#x6C;**,** upgrad&#x65;**,** remov&#x65;**,** purg&#x65;**);** these operations are not performed immediatel&#x79;**,** but put into a task lis&#x74;**.** A single click on a button then validates the operation&#x73;**,** and they are performed in one g&#x6F;**.**

**synaptic package manager**

### Checking Package Authenticity <a href="#toc171120094" id="toc171120094"></a>

Security is very important for administrator&#x73;**.** Accordingl&#x79;**,** they need to ensure that they only install packages that are guaranteed with no tampering on the wa&#x79;**.** A computer cracker could try to add malicious code to an otherwise legitimate packag&#x65;**.** Such a packag&#x65;**,** if installe&#x64;**,** could do anything the cracker designed it to d&#x6F;**,** including for instance disclosing passwords or confidential informatio&#x6E;**.**

APT needs a set of trusted GnuPG public keys to verify signatures in the InRelease and Releas&#x65;**.**&#x67;pg files available on the mirror&#x73;**.** It gets them from files in **/**&#x65;t&#x63;**/**&#x61;p&#x74;**/**&#x74;ruste&#x64;**.**&#x67;p&#x67;**.**&#x64;**/** and from the **/**&#x65;t&#x63;**/**&#x61;p&#x74;**/**&#x74;ruste&#x64;**.**&#x67;pg keyring **(**&#x6D;anaged by the ap&#x74;**-**&#x6B;ey comman&#x64;**).**

**#** ls **/**&#x65;t&#x63;**/**&#x61;p&#x74;**/**&#x74;ruste&#x64;**.**&#x67;p&#x67;**.**&#x64;**/**

![](/files/yjqgv52KxaYEcKvm9wAC)
