How To Install Programs On Linux Ubuntu

How To Install Programs On Linux Ubuntu

Reading time1 min
#Linux#Ubuntu#Software#Snap#Flatpak#PackageManagement

Mastering Ubuntu Software Installation: Beyond the Basics of apt and Snap

If you’ve been using Ubuntu for a while, you’ve likely installed most of your software via the trusty command:

sudo apt install package-name

This method is straightforward and reliable, but if you stop there, you’re only scratching the surface of Ubuntu’s rich ecosystem for software installation.

In this post, we’ll explore why relying solely on apt limits your Linux skills and walk through other powerful methods—like Snap, Flatpak, and direct downloads—that savvy users use to flexibly manage applications with greater control. Whether you want the latest versions, sandboxed apps, or specialized software not found in official repos, mastering these tools will make you a more self-reliant and confident Ubuntu user.


Why Just Using apt Isn’t Enough

apt is the default package manager for Debian-based distros like Ubuntu. It installs software from authenticated repositories configured on your system. This means:

  • Software is vetted and stable: You generally get well-tested versions.
  • Easy upgrades: Updates come through system upgrades.
  • Limited to repo versions: You can only install software available in those repos — often older versions.
  • No sandboxing: Apps have full access to your system, which can sometimes cause conflicts or security worries.

While perfect for many use cases, apt alone doesn’t cover every scenario. Let’s look at alternatives.


1. Installing Software with Snap: Simple & Sandboxed

Snap packages provide containerized, isolated software that bundles all dependencies — great for newer apps that don’t yet have Debian packages or for software that needs isolation.

Installing snaps

Snaps are built by app developers or Canonical and run inside their own secure environment. They auto-update by default.

Example: Install the latest Spotify client as a snap:

sudo snap install spotify

Remove it:

sudo snap remove spotify

Snaps are usually larger in size but keep your system clean because their dependencies don’t interfere with other apps.

Advantages of snaps:

  • Sandboxed and secure
  • Always up-to-date
  • Works across many Linux distros without modification

Downsides:

  • Can be slower to launch because of container overhead
  • Takes more disk space due to bundled dependencies
  • Interface integration sometimes quirky (themes/notifications)

2. Using Flatpak: Another Containerized Option

Flatpak works similarly to Snap but was developed separately by the Linux community. Many desktop environments like GNOME favor Flatpak.

Setting up Flatpak on Ubuntu:

First, install Flatpak support:

sudo apt install flatpak

Add the Flathub repo (the largest Flatpak app source):

flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo

Restart your system or log out/in so Flatpak integrates nicely with apps like GNOME Software Center.

Install an app with Flatpak

For instance, installing Spotify via Flatpak:

flatpak install flathub com.spotify.Client

Run it with:

flatpak run com.spotify.Client

Remove it with:

flatpak uninstall com.spotify.Client

3. Installing Software via Direct Downloads & .deb Files

Sometimes you’ll find software is not packaged as a snap/flatpak or available via apt (especially proprietary tools or bleeding-edge releases).

Example: Installing Google Chrome

Google Chrome isn’t in Ubuntu’s repositories due to licensing restrictions but provides a .deb file on their website.

Steps:

  1. Download the .deb package from https://www.google.com/chrome/
  2. Open a terminal in your Downloads directory or wherever it saved.
  3. Install using dpkg:
sudo dpkg -i google-chrome-stable_current_amd64.deb

If there are missing dependencies/error messages, fix them with:

sudo apt-get install -f

The same approach works for any .deb file from trusted sources.


4. Compiling from Source – For Ultimate Flexibility

For power users who need bleeding-edge custom installs, compiling programs from source can be necessary.

Example: Installing htop latest version from GitHub:

  1. Install build tools/dependencies first:
sudo apt install build-essential autoconf automake pkg-config libncursesw5-dev git
  1. Clone repository:
git clone https://github.com/htop-dev/htop.git
cd htop/
  1. Compile and install:
./autogen.sh && ./configure && make
sudo make install

This method requires more manual maintenance — no automatic upgrading — so only recommended if comfortable troubleshooting compilation errors.


Summary Table of Ubuntu Installation Methods

MethodUse CaseProsCons
aptStable official packagesEasy, secure, integratedOften older versions
SnapLatest versions; sandbox needsSandboxed, auto-updatesLarger size; slower startup
FlatpakGUI apps; cross-distro supportSandboxed; huge app catalogSetup required; desktop quirks
Direct .debProprietary apps; custom installsLatest proprietary appsManual handling of deps
Compile sourceCutting-edge; fully customizedFull controlComplex; time-consuming

Final Tips To Level-Up Your Installation Game

  • Combine methods: Use apt for stable core utilities and add Snap/Flatpaks for newer apps or sandboxed environments.
  • Security first: Only install .deb files or compile source from trusted sites to avoid malware.
  • Stay updated: Use snaps’ automatic updates or periodically check flatpaks updates (flatpak update) alongside regular system updates.
  • Learn troubleshooting: Missing dependencies (apt-get install -f) and version conflicts are common when mixing methods — embrace logs as learning opportunities.

By mastering these installation techniques beyond just apt, you’ll gain flexibility managing multiple software ecosystems, better isolate apps for safety, and enjoy bleeding-edge features when needed—making your Ubuntu experience all the richer!


Happy installing!
If you want specific walkthroughs on any particular app or method I covered here — drop a comment below!