How To Install Software In Linux

How To Install Software In Linux

Reading time1 min
#Linux#Software#OpenSource#apt-get#Snap#Flatpak

Mastering Software Installation in Linux: Beyond apt-get and yum

Installing software efficiently is foundational to effective Linux system management, empowering users to customize environments and ensure optimal performance. While most tutorials stop at apt-get or yum, real mastery lies in leveraging alternative methods like compiling from source, using Snap or Flatpak, and containerized app deployment to unlock Linux's full potential.

In this post, we'll explore practical ways to install software on Linux beyond the usual package managers. Whether you're a sysadmin, developer, or power user, these methods will enhance your system's reliability, security, and flexibility.


1. Why Go Beyond apt-get and yum?

apt-get (Debian/Ubuntu) and yum/dnf (RHEL/CentOS/Fedora) are the go-to tools for installing packages from official repositories. However:

  • Sometimes you need the latest version not available in repos.
  • You want to install software in user space without root.
  • Some applications are sandboxed for security.
  • Containerization can simplify deployment across different environments.

Mastering alternative installation methods gives you more control over your system.


2. Compiling Software from Source

When & Why?

  • To get bleeding-edge features
  • When software isn't packaged
  • Custom configure options or patches required

How-to: Example Installing Latest htop From Source

# Install build dependencies (Debian/Ubuntu)
sudo apt-get update
sudo apt-get install -y build-essential autoconf automake libncurses5-dev pkg-config

# Download source
cd /usr/local/src
sudo wget http://hisham.hm/htop/releases/3.2.1/htop-3.2.1.tar.gz
sudo tar -xzf htop-3.2.1.tar.gz
cd htop-3.2.1

# Build and install
./autogen.sh
./configure
make
sudo make install

# Verify installation
htop --version

Tips:

  • Use checkinstall instead of make install on Debian-based systems if you want easily removable packages.
  • Always check dependencies before compiling.

3. Using Snap Packages

Snap is a universal Linux packaging system developed by Canonical.

Why Snap?

  • Sandboxed applications enhance security.
  • Automatically update apps.
  • Works across many distributions out-of-the-box.

How to Install Snap (if not installed):

# Ubuntu already includes snapd by default,
# for Debian-based:
sudo apt-get install snapd

# For Fedora:
sudo dnf install snapd
sudo ln -s /var/lib/snapd/snap /snap  # enable classic snaps  

Installing Apps with Snap:

snap find spotify   # search for package

sudo snap install spotify   # install latest Spotify client sandboxed

snap list    # show installed snaps

snap remove spotify   # remove app if needed 

4. Using Flatpak for Universal Packages

Flatpak focuses on desktop applications with robust sandboxing.

Setting Up Flatpak:

# Install Flatpak on Ubuntu/Debian:
sudo apt install flatpak

# Add Flathub repo (largest flatpak repo):
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Install an App with Flatpak:

flatpak search vlc          # find VLC player

flatpak install flathub org.videolan.VLC   # install VLC player

flatpak run org.videolan.VLC              # run the app directly 

flatpak uninstall org.videolan.VLC        # uninstall 

Flatpak apps live isolated from core system libraries, reducing risk of conflicts.


5. Containerized App Deployment with Docker or Podman

Using containers for applications ensures consistency regardless of host OS environment and easy rollbacks.

Running an Application with Docker Example:

# Pull Nginx image (web server)
docker pull nginx:latest 

# Run Nginx container exposing port 8080 locally:
docker run --name mynginx -p 8080:80 -d nginx 

# Verify it's running:
docker ps  

# Access http://localhost:8080 in browser  

This example runs software cleanly isolated within a container — no need to worry about host dependencies or versions.

Note: If you want daemonless tools like Docker but more compliant e.g., Fedora/CentOS favor Podman which runs rootless containers simply:

podman run --name mynginx -p 8080:80 -d nginx

6. Bonus: Using AppImages — Portable Executables for Linux

AppImage packages are “download-and-run” executables that don't require installation or root permissions.

How to use an AppImage:

wget https://github.com/AppImage/AppImageKit/releases/download/continuous/OpenShot-x86_64.AppImage

chmod +x OpenShot-x86_64.AppImage

./OpenShot-x86_64.AppImage   # Launch app immediately; it's self-contained!

Great for trying out applications risk-free without dirtying your system.


Summary Table: Installation Methods Overview

MethodProsConsBest Use Case
apt-get / yumEasy, stable, integratedNot always latest versionRegular package maintenance
Compile from sourceFull control, latest versionTime-consuming; manual dependency mgmtCustom builds & experimental software
SnapSandboxed; auto-updates; cross-distroLarger size; some performance tradeoffDesktop apps needing frequent updates
FlatpakRobust sandbox; universal desktop appsSetup overheadGUI apps requiring isolation
Docker/PodmanEnvironment isolation; reproducibleStorage overhead; requires understanding containersServers & dev/test deployments
AppImageNo-install portabilityNo auto updates; security depends on user cautionTesting new apps quickly

Final Thoughts

Mastering Linux software installation means more than just running apt-get install. Whether compiling from source gives you fine tuning, snaps and flatpaks simplify desktop apps securely, containers handle complex deployments cleanly — these skills collectively boost your Linux fluency and empower you as a user or admin.

Experiment with each method depending on your project’s needs — soon you'll unlock the full flexibility that Linux offers for application management!


Feel free to share your experiences or ask about tricky installs in the comments below!

Happy customizing! 🚀🐧