Programs installation on Linux
THIS PAGE IS UNDER DEVELOPMENT
It is always more convenient to install new programs through the native Package Management as the Package Manager will handle the location, updates, paths and launchers.
It exist different package management tools depending on the Linux distribution: From graphic or text-based interfaces to the low level tools used to install packages.
Package Management Programs on Debian
According to [https://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html] (https://www.debian.org/doc/manuals/debian-faq/ch-pkgtools.en.html):
- dpkg is the main package management program is dpkg and can be invoked with many options.
- APT is the Advanced Package Tool, an advanced interface to the Debian packaging system which provides the
apt-get program. It provides commandline tools for searching and managing package.
- aptitude is a package manager for Debian GNU/Linux systems that provides a frontend to the apt package management infrastructure. aptitude is a text-based interface using the curses library. Actions may be performed from a visual interface or from the command-line.
- synaptic is a graphical package manager. It enables you to install, upgrade and remove software packages in a user friendly way. Along with most of the features offered by aptitude, it also has a feature for editing the list of used repositories, and supports browsing all available documentation related to a package.
dpkg uses examples
- To learn the status of all the packages installed on a Debian system, execute the command
- To identify the package that produced the file named foo we can execute
dpkg --search foo
- To learn the status of packages whose names match any pattern beginning with "foo", run the command:
dpkg --list 'foo*'
APT uses examples
- To update the list of packages on our system, we can run in a terminal window:
- To install a new package named newOne and all its dependencies:
apt install newOne
- To remove the newOne package from our system:
apt remove newOne
- To remove the newOne package and its configuration files from our system:
apt purge newOne
- To list all packages for which newer versions are available:
apt list --upgradable
- To upgrade all the packages on our system (without installing extra packages or removing packages):
- To upgrade all the packages on our system and, installing extra packages or removing packages (if needed for a package upgrade) :
Where to install programs manually?
Note that according to Filesystem Hierarchy Standart) [http://www.pathname.com/fhs/] (http://www.pathname.com/fhs/)
- Shareable files can be stored on one host and used on several others.
- Not all files in the filesystem hierarchy are shareable and so each system has local storage containing at least its unshareable files.
- All the files a system requires should be stored on a foreign host and be made available by mounting one or a few directories from the foreign host.
The Root Filesystem
||Essential command binaries
||Static files of the boot loader
||Host-specific system configuration
||Essential shared libraries and kernel modules
||Mount point for removeable media
||Mount point for mounting a filesystem temporarily
||Add-on application software packages
||Essential system binaries
||Data for services provided by this system
As an example, a FHS-compliant system could be:
To install a new package: TODO!!
We can use /opt directory, /opt/appname for example. Launchers (shortcuts) may or may not be created depending on the installer. We can create a launcher manually if the installer does not create one.
/usr/local hierarchy is for installing software locally.
Avoid placing your local binaries directly under /usr, because according to the FHS, that hierarchy is reserved for the software provided by the Linux distribution. TODO... We can use usr/bin or $HOME/bin