Hey there, Ubuntu adventurer! 👋 Ever felt like managing software on Linux could be, well, a bit smoother? Maybe you’ve run into dependency hell or wished you could easily get the very latest version of an app without messing up your system? If that sounds familiar, then you’ve landed in the perfect place. Today, we’re diving deep into the world of Snap packages and showing you exactly how to install Snap on Ubuntu.
Think of this guide as your friendly companion, walking you through everything from understanding what Snaps are to installing them, managing them, and even troubleshooting common hiccups. By the end, you’ll be a Snap pro, ready to harness this powerful technology to streamline your Ubuntu experience. Let’s get snapping!
What Exactly is Snap and Why Should You Care?
Before we jump into the installation commands, let’s quickly demystify what we’re dealing with. Imagine you buy a piece of furniture that comes with all the tools and screws needed right inside the box. You don’t need to raid your toolbox or worry if you have the right size wrench. That’s kind of like a Snap!
A Quick Intro to Snap Packages
Developed by Canonical (the folks behind Ubuntu), Snap is both a package format and a package management system. A “Snap” is essentially a bundled application. It contains the application itself plus most, if not all, of the libraries and dependencies it needs to run. This self-contained nature is key.
Unlike traditional packages (like .deb files managed by APT), which often rely on shared system libraries, Snaps run in a sandbox – a sort of isolated environment. This has some pretty neat implications we’ll explore soon.
The “Why”: Key Advantages of Using Snaps
So, why bother with Snaps when you have the trusty apt
command? Here are a few compelling reasons:
- Up-to-Date Software: Developers can package and release the latest versions of their apps as Snaps without worrying about breaking compatibility with different Ubuntu versions. You get newer software, faster.
- Dependency Freedom: Remember “dependency hell”? Where installing one app breaks another because they need different versions of the same library? Snaps largely solve this by bundling their dependencies.
- Enhanced Security: Snaps run confined or sandboxed by default. They have limited access to your system, reducing potential security risks if an app has a vulnerability.
- Easy Installation & Updates: Installing a Snap is usually a single command. Updates happen automatically in the background (though you can control this).
- Cross-Distro Compatibility: While our focus is Ubuntu, Snaps are designed to run on many different Linux distributions (Fedora, Arch, CentOS, etc.) without modification.
Intrigued? Great! Let’s make sure your system is ready.
Prerequisites: Getting Your Ubuntu System Ready
Good news! The requirements for installing and using Snap are pretty minimal and likely already met if you’re running a modern Ubuntu system.
System Requirements Check
Snap (snapd
, the background service) is designed to run on most versions of Ubuntu you’re likely using today. It’s been included by default in Ubuntu versions starting from 16.04 LTS. If you’re on Ubuntu 14.04 LTS, you’ll need to install it, but for anything newer (18.04, 20.04, 22.04, 24.04, and interim releases), snapd
should already be part of the base system or easily installable.
Internet Connection & Sudo Privileges
This might seem obvious, but:
- Internet Connection: You’ll need an active internet connection to download
snapd
(if it’s not pre-installed) and any Snap packages you want to install. - Sudo Privileges: Installing software on Linux generally requires administrator rights. Make sure you have access to an account that can use the
sudo
command.
That’s pretty much it! Let’s see if Snap is already waiting for you.
Is Snap Already Installed? Let’s Check!
Before we try to install something, it’s wise to check if it’s already there. As mentioned, most modern Ubuntu versions come with snapd
pre-installed.
Using the Terminal to Verify Snapd Presence
The easiest way to check is via the terminal. Open your terminal (Ctrl+Alt+T is a handy shortcut) and type the following command:
snap --version
Press Enter.
- If Snap is installed: You’ll see output showing the
snapd
,snap
,series
,kernel
, and potentially other version numbers. Something like this (versions will vary):snap 2.61.3+git614.g30a05d6 snapd 2.61.3+git614.g30a05d6 series 16 ubuntu 22.04 kernel 6.5.0-28-generic
- If Snap is NOT installed: You’ll likely get a “command not found” error message.
If you got the version information, congratulations! snapd
is installed, and you can skip directly to installing your first Snap application. If you got an error, don’t worry – the next section is for you.
How to Install Snap (snapd) on Ubuntu: The Core Process
If your check revealed that snapd
isn’t installed (perhaps you’re on an older version like 14.04, or using a minimal installation), installing it is straightforward. We’ll cover the most common and recommended method first.
Method 1: The Command Line Way (Recommended)
Using the terminal and the APT package manager is the standard and most reliable way to install snapd
.
Step 1: Refreshing Your Package List (apt update
)
Before installing any new software with APT, it’s crucial to update your system’s package list. This ensures you’re getting the latest available version information from the Ubuntu repositories.
Open your terminal and run:
sudo apt update
You’ll be prompted for your password. Enter it (you won’t see characters typing, that’s normal) and press Enter. Let the command finish updating the lists.
Step 2: Installing the snapd
Daemon (apt install snapd
)
Now that your package list is fresh, you can install the snapd
package. This is the background service (daemon) that manages all your Snaps.
In the same terminal, run:
sudo apt install snapd
APT will figure out the necessary dependencies, show you what will be installed, and ask for confirmation (usually by pressing Y
and then Enter). Let the installation complete.
Step 3: Verifying the Installation
Once the installation finishes, it’s a good idea to verify it worked. Just like we did in the check phase, run:
snap --version
You should now see the version information for snap
, snapd
, etc., confirming that the installation was successful. Hooray!
Method 2: Using the Ubuntu Software Center (GUI Approach)
While the command line is efficient, some users prefer a graphical interface. Modern versions of Ubuntu usually have snapd
installed by default. However, if you needed to install it and prefer a GUI:
- Open the “Ubuntu Software” application (it might look like an orange shopping bag icon).
- In the search bar at the top, type
snapd
. - You should see an entry for
snapd
. Click on it. - If it’s not installed, you should see an “Install” button. Click it.
- You might be prompted for your password to authorize the installation.
(Note: Honestly, snapd
is such a core system component now that it’s almost always pre-installed if you’re using the standard Ubuntu Desktop. This method is more for completeness or if you’re using a very customized spin where it might have been removed.)
Understanding the “Snap Core” – The Foundation
You might notice shortly after installing snapd
, or if you run snap list
, an entry called core
or core18
/core20
/core22
etc. What’s that about?
Think of the “core” snap as the fundamental runtime environment for all other Snaps. It provides the basic libraries and services that most Snaps rely on, ensuring they have a consistent base to run on, regardless of what’s installed on your host Ubuntu system. It’s automatically installed and managed by snapd
itself. You generally don’t need to interact with it directly, but it’s good to know it’s the bedrock upon which your Snap apps are built. Different core snaps (like core18
, core20
, core22
) correspond to different base Ubuntu releases, allowing snaps built against older environments to still run.
Installing Your Very First Snap Application
Alright, snapd
is installed and ready. Now for the fun part – installing some software! Let’s explore how to find and install Snap packages.
Finding Snaps: The snap find
Command
How do you know what applications are available as Snaps? The command line offers a quick way:
snap find <search_term>
Replace <search_term>
with what you’re looking for. For example:
snap find browser # Find web browsers
snap find spotify # See if Spotify is available
snap find "code editor" # Search using multiple words (use quotes)
This command queries the Snap Store (the central repository for Snaps) and lists matching packages with a brief description.
Installing via Command Line (snap install
) – Example Included
Once you’ve found a Snap you want, installing it is incredibly simple. The command format is:
sudo snap install <snap_name>
Replace <snap_name>
with the exact name you found using snap find
or know from the Snap Store website (snapcraft.io/store).
Example: Installing the hello-world
Snap
This is a classic test package. Let’s install it:
sudo snap install hello-world
You’ll see output showing the download progress and the setup process. Once done, you can usually run the application directly from the terminal (or find it in your application menu if it’s a GUI app). For hello-world
, try running:
hello-world
You should see a “Hello World!” message. Success!
Example: Installing Spotify
Let’s try a real-world application:
sudo snap install spotify
After installation, you should find the Spotify icon in your application menu.
Installing via the Snap Store (GUI)
If you prefer clicking over typing, you can use a graphical Snap Store.
- Modern Ubuntu often integrates Snap search results directly into the “Ubuntu Software” application. Searching for an app like “Spotify” or “VLC” here might show you the Snap version alongside the APT version. Look for the source indication (it might say “Snap Store”).
- Alternatively, you can install the dedicated “Snap Store” application itself (yes, the store can be a Snap!):
sudo snap install snap-store
Once installed, launch the “Snap Store” app. It provides a graphical interface similar to other app stores, allowing you to browse categories, search for apps, and install them with a click.
Mastering Snap Management: Essential Commands
Installing is just the beginning. You’ll need to manage your Snaps – see what’s installed, update them, and remove them when necessary. Luckily, the snap
command makes this easy.
Listing Your Installed Snaps (snap list
)
To see all the Snaps currently installed on your system, along with their version, revision number, and developer, use:
snap list
You’ll see a table listing everything, including the core
snaps and any applications you’ve installed.
Keeping Snaps Up-to-Date (snap refresh
)
One of the major conveniences of Snap is automatic updates. By default, snapd
checks for updates several times a day and applies them in the background. However, you can manually trigger an update check for all Snaps:
sudo snap refresh
If you want to update a specific Snap:
sudo snap refresh <snap_name>
Understanding Automatic Updates
While automatic updates are great for security and getting new features, you can control them if needed (e.g., setting specific times). You can see your refresh timer settings with snap refresh --timer
. Managing these settings is a bit more advanced, but man snap
is your friend here. Generally, the default behaviour works well for most users. If an update causes issues, Snaps also keep the previous version, allowing you to potentially revert (sudo snap revert <snap_name>
).
Removing Unwanted Snaps (snap remove
)
No longer need an application? Removing a Snap is just as easy as installing it:
sudo snap remove <snap_name>
For example, to remove the hello-world
Snap we installed earlier:
sudo snap remove hello-world
This will uninstall the application and clean up its data (unless you use specific flags to preserve data).
Getting Detailed Info About a Snap (snap info
)
Want to know more about a specific Snap, either installed or available in the store? Use the info
command:
snap info <snap_name>
Example:
snap info vlc
This command provides a wealth of information: description, developer, contact details, license, commands provided by the Snap, the channels available (like stable, candidate, beta, edge), and the currently installed version/channel.
Checking Recent Snap Activity (snap changes
)
To see a history of recent Snap operations (installs, updates, removals), use:
snap changes
This lists recent tasks, their status (Done, Doing, Error), and a summary. It’s useful for troubleshooting if something seems off.
Snap vs. APT (.deb): Understanding the Key Differences
It’s helpful to understand how Snaps compare to the traditional Debian package management system (APT) used in Ubuntu. They can coexist peacefully, but they operate differently.
Feature | Snap | APT (.deb packages) |
---|---|---|
Packaging | Bundles app + dependencies | Relies on shared system libraries |
Dependencies | Self-contained, avoids conflicts | Managed by APT, potential for conflicts |
Updates | Automatic (default), channel-based | Manual (apt upgrade ), tied to repo version |
Sandboxing | Confined by default (enhanced security) | Generally runs with user privileges |
Disk Space | Can be larger (bundled libs) | Often smaller (shared libs) |
Startup Time | Can sometimes be slower (mounting fs) | Generally faster startup |
Versioning | Easy access to latest versions via channels | Tied to Ubuntu release cycle (usually) |
System Scope | User-space primarily, isolated | Integrates deeply with the system |
Rollbacks | Built-in (snap revert ) |
More complex, usually not straightforward |
Neither system is inherently “better”; they serve different needs. Snaps excel at providing recent software and isolating apps, while APT is deeply integrated and efficient for core system components and libraries. Many systems use both effectively.
Digging Deeper: The Benefits of Embracing Snaps
We touched on advantages earlier, but let’s elaborate:
Up-to-Date Software Availability
This is huge. Developers can push updates to the Snap Store immediately, and users get them quickly, often automatically. No more waiting for the next Ubuntu release or wrestling with PPAs (Personal Package Archives) just to get a newer version of Firefox, VS Code, or your favorite IDE.
Enhanced Security Through Confinement
The sandbox is a major security plus. Snaps declare the permissions they need (like network access, access to home directory files, etc.) and are confined by default. Even if you install a malicious or compromised Snap, its ability to damage your system is significantly limited compared to a traditionally installed application. You can manage these permissions using Ubuntu Software or command-line tools.
Simplified Dependency Management
For users, it “just works.” You install a Snap, and it brings everything it needs. You don’t have to worry about installing Library X version 2.1 before App Y will run. For developers, it means packaging once and having it run across many distributions and versions.
Cross-Distribution Compatibility (The Bigger Picture)
While we focus on Ubuntu, the fact that a Snap package built for Ubuntu can often run identically on Fedora, Manjaro, or Debian is a significant advantage for the broader Linux ecosystem, simplifying life for both developers and users moving between distros.
Release Channels (Stable, Beta, Edge)
Want to try the latest beta features of an app without risking the stability of your main installation? Snaps often provide channels:
- Stable: The default, well-tested release.
- Candidate: Release candidates, potentially becoming the next stable.
- Beta: Less stable, for testing upcoming features.
- Edge: Development snapshots, potentially unstable but bleeding-edge.
You can switch between channels easily using sudo snap refresh <snap_name> --channel=<channel_name>
.
Potential Drawbacks and Considerations
It’s important to have a balanced view. Snaps aren’t perfect, and there are some common criticisms or trade-offs:
Startup Times
Because Snaps are mounted as compressed filesystem images, the very first time you launch a Snap after booting (or after it’s been updated), it might take noticeably longer to start compared to its APT counterpart. Subsequent launches are usually faster. This has improved over time but can still be noticeable for some applications.
Disk Space Usage
Since Snaps bundle their dependencies, they often consume more disk space than their APT equivalents, which share system libraries. If you install many Snaps, the cumulative effect can be significant, especially on smaller drives.
Theming Integration Challenges (Historically)
Early on, Snaps sometimes struggled to integrate perfectly with system themes, leading to apps looking out of place (e.g., wrong icons, fonts, or colours). This has gotten much better, with mechanisms for theme sharing, but occasional inconsistencies can still crop up depending on the specific theme and application.
Centralization (Canonical’s Store)
The primary source for Snaps is the Canonical-run Snap Store. While convenient, this centralization concerns some users who prefer the more decentralized nature of traditional Linux repositories or alternative systems like Flatpak (which has Flathub). It’s technically possible to host your own Snaps, but the ecosystem revolves around the official store.
Troubleshooting Common Snap Issues
While generally robust, you might occasionally encounter issues. Here are a few common ones and how to approach them:
“snap command not found”
This almost always means snapd
is not installed correctly or your system’s PATH
environment variable isn’t configured properly (less common on standard installs). Go back to the installation steps and verify snapd
was installed successfully (sudo apt install snapd
). You might need to log out and log back in, or even reboot, for the PATH
changes to take effect.
Slow Snap Performance
- First Launch: As mentioned, the first launch can be slow. Try launching the app a second time.
- System Resources: Check if your system is low on RAM or CPU resources. Snaps, especially large ones, can be resource-intensive.
- Disk I/O: Slow disk drives (especially older HDDs) can exacerbate the mount/startup time.
Installation/Refresh Errors
- Network Issues: Check your internet connection. Sometimes transient network problems can interrupt downloads. Try the command again later.
- Snap Store Issues: Occasionally, the Snap Store itself might have temporary issues. Check
snap changes
for error details. - Conflicting Processes: Rarely, another package manager process might interfere. Ensure
apt
processes aren’t running simultaneously.
Permission Problems
If a Snap app can’t access your files, webcam, or network when you expect it to:
- Check its connections/permissions:
snap connections <snap_name>
- You can often manage permissions graphically via “Ubuntu Software” -> Installed -> [Select Snap] -> Permissions.
- Or use command line
snap connect
/snap disconnect
commands (this is more advanced).
The Bigger Picture: Snap in the Linux Ecosystem
Snap isn’t just an Ubuntu thing anymore. It represents a significant shift towards application-centric package management in the Linux world. Alongside alternatives like Flatpak and AppImage, it addresses long-standing challenges around software distribution, updates, and security on diverse Linux systems. While debates exist about the “best” approach, Snaps have gained considerable traction, particularly with major software vendors (like Microsoft, Google, Spotify) who use it to distribute their applications easily to Linux users. Understanding how to install Snap on Ubuntu equips you with a key skill for navigating the modern Linux application landscape.
Frequently Asked Questions (FAQs)
1. Can I use both Snap and APT packages on the same Ubuntu system?
Absolutely! Snap and APT are designed to coexist peacefully. You can install core system components and libraries via APT, and use Snaps for specific user applications, especially when you want the latest versions or sandboxing benefits. Many default Ubuntu installations already use both.
2. Are Snaps less secure than APT packages because they come from one store?
Not necessarily. While APT packages often undergo rigorous review by distribution maintainers, Snaps have their own security advantages, primarily confinement (sandboxing). This limits what a Snap application can access on your system, providing strong protection even if the app itself has flaws. Permissions management allows fine-grained control. Both systems have security pros and cons; Snaps prioritize application isolation.
3. Do I have to use Snaps on Ubuntu? Can I remove snapd
?
While snapd
comes pre-installed on modern Ubuntu and some core apps (like the Software store or Firefox in some releases) are delivered as Snaps, you are not forced to use them for everything. You can still rely heavily on APT. Removing snapd
entirely is possible (sudo apt purge snapd
), but be aware it might remove applications that depend on it (like the default Ubuntu Software app). Check dependencies carefully before removing it.
4. How can I tell if an application in the Ubuntu Software store is a Snap or an APT package?
When you view an application’s details page in the “Ubuntu Software” center, scroll down to the details section. There should be a “Source” field indicating where the package comes from. It will typically say “Snap Store” for Snaps or show the Ubuntu repository name (e.g., “ubuntu-jammy-main”) for APT packages. Sometimes, dropdowns allow you to choose the source if both are available.
5. What if a Snap application looks weird or doesn’t match my desktop theme?
This was a more common issue previously but has improved. First, ensure the gtk-common-themes
snap is installed (snap list
). This snap provides common themes for other snaps to use. If issues persist, try logging out and back in. Sometimes, specific snaps might have known theming issues; searching online for “[snap name] theme issue” might yield specific workarounds or confirm if it’s a known bug being worked on.