Linux, with its open-source philosophy and robust command-line interface, offers a powerful and flexible environment for managing software. While the graphical user interface (GUI) has become increasingly user-friendly, understanding the underlying principles of software installation is crucial for any Linux user, whether a hobbyist experimenting with aerial photography or a professional drone surveyor. This guide will navigate you through the primary methods of installing software on most popular Linux distributions.
Understanding Linux Package Management
At its core, Linux software installation revolves around package managers. These are sophisticated systems designed to automate the process of downloading, configuring, installing, updating, and removing software packages. They handle dependencies – other software components that a program requires to run – ensuring that when you install an application, all its necessary prerequisites are also installed. This prevents the common “missing DLL” errors often encountered on other operating systems.

Package Managers: The Backbone of Linux Software
Different Linux distributions utilize different package management systems. The most prevalent ones are:
-
Debian-based distributions (e.g., Ubuntu, Debian, Linux Mint): These use
.debpackages and theapt(Advanced Package Tool) command-line utility.aptis a high-level interface that works with lower-level tools likedpkg. It is widely regarded for its ease of use and comprehensive feature set, including handling dependencies, fetching packages from remote repositories, and performing upgrades. -
Red Hat-based distributions (e.g., Fedora, CentOS, RHEL): These employ
.rpm(Red Hat Package Manager) packages and thednf(Dandified YUM) command-line tool.dnfis the successor toyumand offers significant improvements in performance and dependency resolution. For older systems,yummight still be in use. -
Arch Linux and its derivatives (e.g., Manjaro): These use the
pacmanpackage manager, known for its simplicity and speed, with.pkg.tar.zst(or similar compressed tarball) packages. Arch Linux also has the Arch User Repository (AUR), a community-driven repository for packages not officially included in the main repositories.
Software Repositories: The Central Hubs
Software packages are typically stored in online repositories. These are servers maintained by the distribution developers or third parties, containing vast collections of pre-compiled software. When you use a package manager, you are instructing it to search these repositories for the software you wish to install. The package manager then downloads the correct version for your system architecture and handles the installation process.
Why Use Package Managers?
- Dependency Resolution: Automatically installs required libraries and other software components.
- Version Control: Ensures compatible versions of software are installed.
- Security: Packages from official repositories are generally vetted and trusted.
- Ease of Use: Simplifies the installation, update, and removal of software.
- System Stability: Helps maintain a consistent and stable operating system by managing software interactions.
Installing Software with apt (Debian/Ubuntu Based Systems)
The apt package manager is the standard for Ubuntu and its derivatives, offering a user-friendly yet powerful way to manage software. Before installing any new software, it’s good practice to update your system’s package lists.
Updating Package Lists and Upgrading Existing Packages
This ensures that apt has the latest information about available software and security updates.
sudo apt update
This command downloads the package information from all configured repositories. It does not install or upgrade any software; it simply refreshes the local cache of available packages.
sudo apt upgrade
This command installs the newest versions of all packages currently installed on the system from which packages have already been downloaded. It’s crucial to run sudo apt update before sudo apt upgrade to ensure you are upgrading to the latest available versions.
Installing New Software
Once your package lists are updated, you can install new applications.
sudo apt install <package_name>
Replace <package_name> with the exact name of the software you want to install. For instance, to install the vlc media player, you would type:
sudo apt install vlc
You can install multiple packages at once by listing them separated by spaces:
sudo apt install vlc gimp inkscape
apt will then list the packages to be installed, along with their dependencies, and prompt you to confirm by typing ‘Y’ and pressing Enter.
Searching for Software
If you’re unsure of the exact package name, you can search the repositories.
apt search <keyword>
This command searches for packages whose names or descriptions contain the specified keyword. For example, to find packages related to drone flight logging:
apt search drone flight log
The output will list relevant packages. You can then use the apt install command with the identified package name.
Removing Software
When you no longer need a piece of software, it’s important to remove it cleanly.
sudo apt remove <package_name>
This command uninstalls the specified package but leaves its configuration files behind. This can be useful if you might reinstall the software later and want to keep your previous settings.
sudo apt purge <package_name>
This command uninstalls the specified package and also removes its configuration files, performing a more complete cleanup.
sudo apt autoremove
After removing packages, especially those that were installed as dependencies for other software, you might have orphaned dependencies left on your system. This command removes packages that were automatically installed to satisfy dependencies for other packages and are now no longer needed.
Installing Software with dnf (Fedora/CentOS/RHEL Based Systems)
For distributions based on Red Hat, such as Fedora, CentOS, and Rocky Linux, the dnf package manager is the primary tool for software installation. Similar to apt, it’s essential to keep your system and package lists updated.
Updating Package Lists and System Packages
sudo dnf check-update
This command checks for available updates for all installed packages. It is analogous to apt update.
sudo dnf upgrade
This command upgrades all installed packages to their latest available versions. It’s generally recommended to run check-update first, though upgrade will often perform a check implicitly.
Installing New Software
To install a new application using dnf, you use the install command.
sudo dnf install <package_name>
Replace <package_name> with the name of the software you wish to install. For example, to install the firefox web browser:
sudo dnf install firefox
As with apt, dnf will display the packages to be installed, including dependencies, and ask for confirmation.
Searching for Software
To find packages related to specific functionalities, use the search command.
dnf search <keyword>
For instance, to find software related to 3D modeling for drone mapping:
dnf search 3d model drone
The results will help you identify the correct package names.
Removing Software
Uninstalling software with dnf is straightforward.
sudo dnf remove <package_name>
This command removes the specified package. dnf will also prompt to remove any dependencies that are no longer required by any installed package.
sudo dnf autoremove
While dnf remove often handles dependent packages, autoremove explicitly cleans up orphaned dependencies.
Installing Software from Source Code
While package managers are the most common and recommended method for installing software on Linux, there are instances where you might need to compile software directly from its source code. This is often necessary for:

- The Latest Versions: When a package is not yet available in the distribution’s repositories, or you need a bleeding-edge version.
- Customization: To enable or disable specific features during the compilation process.
- Proprietary Software: Some software, especially that used in specialized fields like advanced drone sensor calibration, might be distributed as source code.
The Compilation Process: A General Overview
Compiling software from source typically involves a few standard steps, although the exact commands and order can vary.
1. Obtain the Source Code
Download the source code, usually in a compressed archive (e.g., .tar.gz, .tar.bz2, .zip). You can often find links on the software’s official website or its version control repository (like GitHub).
2. Extract the Source Code
Use a command-line utility to extract the archive.
- For
.tar.gz:tar -xzvf <source_archive.tar.gz> - For
.tar.bz2:tar -xjvf <source_archive.tar.bz2>
This will create a new directory containing the source files.
3. Navigate to the Source Directory
Change your current directory to the newly extracted folder.
cd <source_directory_name>
4. Configure the Build
This step checks your system for necessary dependencies and prepares the build environment. Many source packages use a configure script.
./configure
This script often accepts various options to customize the build. You can see available options by running ./configure --help. Common options include --prefix=/usr/local to specify the installation directory.
5. Compile the Source Code
This step translates the human-readable source code into machine-readable object code.
make
This command can take a significant amount of time, depending on the size and complexity of the software.
6. Install the Software
After successful compilation, you install the program onto your system.
sudo make install
This command typically copies the compiled binaries, libraries, and documentation to their appropriate locations on your system, often within the directory specified by the --prefix option during the configure step.
Dependencies for Compiling
A critical aspect of compiling from source is ensuring you have the necessary build tools and development libraries installed. This is where package managers are still essential.
- On Debian/Ubuntu: Install the
build-essentialpackage:sudo apt install build-essential. This metapackage pulls in essential compilers (like GCC),make, and other development tools. You might also need to install specific development headers for libraries the software depends on (e.g.,libsdl2-dev). - On Fedora/CentOS/RHEL: Install the “Development Tools” group:
sudo dnf groupinstall "Development Tools". Similarly, you may need to install development headers for specific libraries (e.g.,SDL2-devel).
Always consult the README or INSTALL file within the source code directory for specific instructions and dependency requirements.
Flatpak and Snap: Modern Universal Packaging
Beyond traditional package managers, Linux has seen the rise of universal packaging formats like Flatpak and Snap. These aim to provide a more consistent and isolated way to distribute and install applications across different Linux distributions.
Flatpak
Flatpak applications are distributed as “runtimes” and “applications.” Runtimes provide common libraries, while applications bundle their own specific dependencies, ensuring they run consistently regardless of the underlying distribution.
Installing Flatpak
First, ensure Flatpak is installed on your system. On Ubuntu:
sudo apt install flatpak
On Fedora:
sudo dnf install flatpak
Adding the Flathub Repository
The primary source for Flatpak applications is Flathub.
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Installing Applications with Flatpak
Once Flatpak and the Flathub repository are set up, you can install applications.
flatpak install flathub <application_id>
For example, to install the advanced image editor GIMP via Flathub:
flatpak install flathub org.gimp.GIMP
You can search for applications on the Flathub website or by using the command line:
flatpak search <keyword>
Running Flatpak Applications
Flatpak applications are typically launched from the application menu like any other installed program. You can also run them from the terminal:
flatpak run <application_id>
Snap
Developed by Canonical (the creators of Ubuntu), Snap is another universal packaging system. Snaps are self-contained applications that include all their dependencies.
Installing Snapd
Ensure the Snap daemon (snapd) is installed. On Ubuntu, it’s often pre-installed. On other distributions:
- Debian/Ubuntu:
sudo apt install snapd - Fedora:
sudo dnf install snapd
After installation, it’s often recommended to log out and log back in for snap commands to be available.
Installing Applications with Snap
To install an application using Snap:
sudo snap install <application_name>
For example, to install the popular code editor VS Code:
sudo snap install code --classic
The --classic flag is sometimes needed for applications that require broader system access, similar to traditional installations.
Searching for Snaps
You can search for available snaps:
snap find <keyword>
Running Snap Applications
Snap applications can usually be found in your application menu.
Advantages of Flatpak and Snap
- Consistency: Applications behave the same way across different Linux distributions.
- Isolation: Applications run in a sandbox, improving security and preventing conflicts with system libraries.
- Ease of Updates: Updates are managed by the respective packaging system.

Conclusion: Empowering Your Linux Software Installation Journey
Mastering software installation on Linux is a fundamental skill that unlocks the full potential of this versatile operating system. From the efficiency of package managers like apt and dnf to the control offered by compiling from source and the modern convenience of Flatpak and Snap, each method serves distinct purposes. By understanding these tools, users can confidently install, manage, and utilize the vast array of software available for Linux, whether for optimizing drone flight logs, analyzing aerial imagery, or developing cutting-edge flight control systems.
