BackSlash Linux features a comprehensive package management system for installing, upgrading, configuring, and removing software. In addition to providing access to an organized base of over 45,000 software packages for your computer, the package management facilities also feature dependency resolution capabilities and software update checking.
Several tools are available for interacting with BackSlash Linux's package management system, from simple command-line utilities which may be easily automated by system administrators, to a simple graphical interface which is easy to use by those new to BackSlash Linux.
BackSlash Linux's package management system is derived from the same system used by the Debian GNU/Linux distribution. The package files contain all of the necessary files, meta-data, and instructions to implement a particular functionality or software application on your BackSlash computer.
Debian package files typically have the extension '.deb', and usually exist in repositories which are collections of packages found on various media, such as CD-ROM discs, or online. Packages are normally in a pre-compiled binary format; thus installation is quick, and requires no compiling of software.
Many complex packages usedependencies. Dependencies are additional packages required by the principal package in order to function properly. For example, the speech synthesis packagefestivaldepends upon the packagelibasound2, which is a package supplying theALSAsound library needed for audio playback. In order forfestivalto function, it and all of its dependencies must be installed. The software management tools in BackSlash Linux will do this automatically.
dpkg is a package manager for Debian-based systems. It can install, remove, and build packages, but unlike other package management systems, it cannot automatically download and install packages or their dependencies. This section covers using dpkg to manage locally installed packages:
To list all packages installed on the system, from a terminal prompt type:
Depending on the amount of packages on your system, this can generate a large amount of output. Pipe the output through grep to see if a specific package is installed:
dpkg -l | grep apache2
Replace apache2 with any package name, part of a package name, or other regular expression.
To list the files installed by a package, in this case theufwpackage, enter:
dpkg -L ufw
If you are not sure which package installed a file, dpkg -S may be able to tell you. For example:
dpkg -S /etc/host.conf base-files: /etc/host.conf
The output shows that the /etc/host.conf belongs to the base-files package.
NOTE Many files are automatically generated during the package install process, and even though they are on the filesystem, dpkg -S may not know which package they belong to.
You can install a local .deb file by entering:
sudo dpkg -i zip_3.0-4_i386.debChange zip_3.0-4_i386.debto the actual file name of the local .deb file you wish to install.
Uninstalling a package can be accomplished by:
sudo dpkg -r zip
NOTE Uninstalling packages using dpkg, in most cases, is NOT recommended. It is better to use a package manager that handles dependencies to ensure that the system is in a consistent state. For example using
dpkg -r zipwill remove the zip package, but any packages that depend on it will still be installed and may no longer function correctly.
For more dpkg options see the man page:
The apt command is a powerful command-line tool, which works with BackSlash Linux's Advanced Packaging Tool (APT) performing such functions as installation of new software packages, upgrade of existing software packages, updating of the package list index, and even upgrading the entire BackSlash Linux system.
Being a simple command-line tool, apt has numerous advantages over other package management tools available in BackSlash Linux for server administrators. Some of these advantages include ease of use over simple terminal connections (SSH), and the ability to be used in system administration scripts, which can in turn be automated by the cron scheduling utility.
Some popular use of APT are:
Install a Package: Installation of packages using the apt tool is quite simple. For example, to install the network scanner nmap, type the following:
sudo apt install nmap
Remove a Package: Removal of a package (or packages) is also straightforward. To remove the package installed in the previous example, type the following:
sudo apt remove nmap
Multiple Packages: You may specify multiple packages to be installed or removed, separated by spaces.
Also, adding the --purge option to
apt removewill remove the package configuration files as well. This may or may not be the desired effect, so use with caution.
Update the Package Index: The APT package index is essentially a database of available packages from the repositories defined in the /etc/apt/sources.list file and in the /etc/apt/sources.list.d directory. To update the local package index with the latest changes made in the repositories, type the following:
sudo apt update
Upgrade Packages: Over time, updated versions of packages currently installed on your computer may become available from the package repositories (for example security updates). To upgrade your system, first update your package index as outlined above, and then type:
sudo apt upgrade
Actions of the apt command, such as installation and removal of packages, are logged in the /var/log/dpkg.log log file.
For more help type: