How to Install Chromium Browser on Ubuntu 24.04, 22.04, or 20.04

Chromium Browser is the open-source foundation for many modern web browsers, including Google Chrome. Known for its speed, security, and support for modern web standards, Chromium is a popular choice for users who want a customizable, privacy-focused browser without the proprietary components found in Chrome. Chromium supports a wide array of extensions, offers regular updates, and can be configured to suit various browsing needs.

On Ubuntu 24.04, 22.04, or 20.04, Chromium can be installed using several methods. The first method is via the Ubuntu default APT repository, which provides a stable and straightforward installation. However, for those looking for potentially newer versions, the xtradeb/apps Launchpad PPA offers an alternative. By using apt pinning, you can ensure that only the Chromium package is installed from this PPA, avoiding unintended updates to other packages. Additionally, Chromium can be installed via Flatpak from Flathub, which provides a sandboxed environment and may offer different update schedules. This guide will walk you through all these installation methods, helping you choose the best approach based on your preferences.

Update the Ubuntu System Before the Chromium Installation

Before proceeding with the installation of Chromium, it’s essential to update your Ubuntu system. This ensures that all existing packages are up-to-date, helping you avoid potential conflicts during the installation process. To update your system, execute the following command:

sudo apt update && sudo apt upgrade

Method 1: Install Chromium Browser via APT

Install Chromium Browser via APT Commands

There are two main options for installing Chromium on your Ubuntu system: using the Ubuntu repository or a PPA (Personal Package Archive). Each method has advantages, so let’s explore both options.

Option 1: Install Chromium Browser with the Ubuntu Repository

The first installation option uses the APT package manager. However, it’s important to note that this method installs Chromium as a Snap package, similar to the default installation of Firefox. If you don’t mind using Snap packages, this method is an excellent choice. However, if you prefer a non-snap APT method, you may want to consider Method 2, which uses a PPA.

To install Chromium with the Ubuntu repository and Snapcraft, execute the following command:

sudo apt install chromium-browser

Option 2: Install Chromium Browser via APT PPA

The second option involves using the xtradeb/apps Launchpad PPA, which contains several well-known applications, including the Chromium browser. These applications are updated more frequently, making this PPA a reliable option for installing Chromium.

First, import the PPA by running the following command:

sudo add-apt-repository ppa:xtradeb/apps -y

After adding the PPA, update the packages list with this command:

sudo apt update

Finally, install Chromium by executing the following command:

sudo apt install chromium

You can employ the APT pinning technique to adjust package priorities in your system, particularly for Chromium from the xtradeb/apps repository. This method effectively sets a higher preference for specific packages, ensuring they are chosen over others during installation or updates.

The process is straightforward and can be executed using a concise command. Here’s the method:

Use the following command to set up a pinning preference for the Chromium package:

echo "Package: chromium\nPin: release o=LP-PPA-xtradeb-apps\nPin-Priority: 700" | sudo tee /etc/apt/preferences.d/chromium-pin

This command utilizes echo to generate the necessary pinning information, which is subsequently directed using a pipe (|) into the sudo tee command. This action creates a file in /etc/apt/preferences.d/ named chromium-pin. The file serves as an instruction for your system, ensuring it precedes the Chromium package from this particular PPA over other options.

Method 2: Install Chromium Browser via Flatpak and Flathub

This section will explore an alternative method to install Chromium using the Flatpak package manager. Flatpak is a universal packaging format similar to Snap, offering benefits such as sandboxing, easy distribution, and increased security for applications like Chromium.

Note: If your system does not have Flatpak installed, please refer to our comprehensive guide on installing or upgrading Flatpak on Ubuntu for step-by-step instructions on installing the most recent supported version of Flatpak.

Enable Flathub For Chromium Browser Installation

Before installing Chromium through Flatpak, you must enable the Flathub repository, a primary source for Flatpak applications. To enable Flathub, execute the following command in your terminal:

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

This command adds the Flathub repository to your Flatpak configuration, ensuring you have access to various applications, including Chromium.

Install Chromium via Flatpak Command

With Flathub enabled, you can install Chromium on Ubuntu using the flatpak install command. Run the following command in your terminal:

flatpak install flathub org.chromium.Chromium -y

This command installs Chromium from the Flathub repository, providing you with the latest browser version.

Launch Chromium Browser via CLI or GUI

Now that you have successfully installed the Chromium Browser on your system, it’s time to launch it and start browsing. Depending on your preferences and installation method, there are several ways to open Chromium.

CLI Methods to Launch Chromium

You can launch Chromium immediately from your terminal by typing the following command:

chromium

If you installed Chromium using Flatpak, you would need to use a different command to launch it from the terminal:

flatpak run org.chromium.Chromium

While launching Chromium from the terminal can be quick and convenient, it might not always be the most practical option for everyday use.

GUI Method to Launch Chromium Browser

You can launch Chromium directly from your desktop environment for a more user-friendly approach. To do this, follow these steps:

  1. Open the Show Applications menu at the bottom-left corner of your screen.
  2. Search for “Chromium Web Browser” in the search bar or browse the list of installed applications.
  3. Click on the Chromium Web Browser icon to launch the browser.

Managing Chromium Browser

Update the Chromium Browser

To ensure optimal performance and security, it is essential to keep your Chromium browser updated. Depending on your installation method, use one of the following commands to update Chromium:

APT Chromium Update Method

If you installed Chromium using the APT package manager, execute the following command in your terminal to check for updates and upgrade all packages, including Chromium:

sudo apt upgrade && sudo apt upgrade

Flatpak Chromium Update Method

If you installed Chromium with Flatpak, use the following command to update the browser:

flatpak update

Remove Chromium Browser

If you no longer need the Chromium browser on your system, use one of the following commands based on your installation method to uninstall it:

APT Chromium Remove Method

For users who installed Chromium using the APT and Ubuntu’s repository package manager, execute the following command in your terminal to remove the browser:

sudo snap remove chromium

Note: Ubuntu’s default Chromium installation version now uses Snap, as you may have noticed when installing it, so it is best to use the Snap remove command.

Alternatively, if you installed Chromium from the PPA, you can run the following command to remove Chromium:

sudo apt remove chromium

Flatpak Chromium Remove Method

For users who installed Chromium using Flatpak, run the following command to uninstall the browser and delete its associated data:

flatpak uninstall --delete-data org.chromium.Chromium

Closing Thoughts

Installing Chromium Browser on your Ubuntu system through the default repository provides a stable and well-integrated experience. If you prefer access to potentially newer builds, the xtradeb/apps Launchpad PPA is a solid alternative, especially with apt-pinning to control updates. The Flatpak method offers an isolated environment that might appeal to users looking for enhanced security or alternative update mechanisms. Regular updates through these methods ensure that your Chromium installation remains secure, fast, and capable of handling the latest web standards on Ubuntu.

Leave a Comment