#readwise
# Linux Fundamentals - Package Management

## Metadata
- Author: [[Hack The Box]]
- Full Title: Linux Fundamentals
- URL: https://academy.hackthebox.com/module/18/section/72
## Highlights
There are different package management programs that we can use for this. Here is a list of examples of such programs:
- `dpkg` **The dpkg is a tool to install, build, remove, and manage Debian packages.** The primary and more user-friendly front-end for `dpkg` is aptitude.
- `apt` provides a high-level command-line interface for the package management system.
- `aptitude` is an alternative to apt `and` is a high-level interface to the package manager.
- `snap` Install, configure, refresh, and remove snap packages. **Snaps enable the secure distribution of the latest apps and utilities** for the cloud, servers, desktops, and the internet of things.
- **`gem` is the front-end to RubyGems, the standard package manager for Ruby.**
- **`pip` is a Python package installer recommended for installing Python packages that are not available in the Debian archive.** It can work with version control repositories (currently only Git, Mercurial, and Bazaar repositories), logs output extensively, and prevents partial installs by downloading all requirements before starting installation.
- `git` is a fast, scalable, distributed revision control system with an unusually rich command set that provides both high-level operations and full access to internals.
---
**Debian-based Linux distributions use the APT package manager. A package is an archive file containing multiple ".deb" files. The `dpkg` utility is used to install programs from the associated ".deb" file. APT makes updating and installing programs easier because many programs have dependencies. When installing a program from a standalone ".deb" file, we may run into dependency issues and need to download and install one or multiple additional packages. APT makes this easier and more efficient by packaging together all of the dependencies needed to install a program.**
---
**Each Linux distribution uses software repositories that are updated often. When we update a program or install a new one, the system queries these repositories for the desired package.** Repositories can be labeled as stable, testing, or unstable. **Most Linux distributions utilize the most stable or "main" repository. This can be checked by viewing the contents of the `/etc/apt/sources.list` file.** The repository list for Parrot OS is at `/etc/apt/sources.list.d/parrot.list`.
---
APT uses a database called the APT cache. This is used to provide information about packages installed on our system offline.
---