How to Install Google Chrome on Ubuntu 24.04, 22.04, or 20.04

Google Chrome is one of the most popular web browsers globally, and its use on Ubuntu desktops is no exception. Google Chrome is one of the most popular web browsers, known for its speed, security, and extensive library of extensions. It offers users the ability to sync their browsing data across devices, access developer tools, and enjoy a seamless browsing experience. Chrome is available in several versions: the stable build for general users, the beta build for those who want to test upcoming features, and the unstable (dev) build for developers looking to access the latest experimental features.

On Ubuntu 24.04, 22.04, or 20.04, you can install Google Chrome using Google’s official APT repository, which provides access to the latest stable, beta, and unstable builds. This method ensures that your browser is always up-to-date with the latest features and security patches directly from Google. Alternatively, Chrome can be installed via Flatpak from Flathub, where you can choose between the stable and unstable builds, in a sandboxed environment that provides additional security and isolation. This guide will walk you through both installation methods, allowing you to choose the best option for your needs.

Method 1: Install Google Chrome via APT Google PPA

Update Ubuntu Before Google Chrome Installation

Ensure that your Ubuntu system is up to date before we initiate the installation process. This helps prevent conflicts during installation, as outdated software can sometimes interfere with new installations.

To update your system, execute the following command in the terminal:

sudo apt update

This command fetches the latest package information from all configured sources. Next, let’s upgrade any outdated packages on your system using the subsequent command:

sudo apt upgrade

This command will upgrade all the software packages with new versions available in the repositories.

Install Initial Packages For Google Chrome

Google Chrome’s installation process is usually straightforward, but you might need specific packages for a smooth and successful setup. Most Linux distributions typically include these standard packages. Nonetheless, verifying their presence doesn’t hurt.

To install these packages, run the following command:

sudo apt install curl software-properties-common apt-transport-https ca-certificates -y

The packages curl, software-properties-common, apt-transport-https, and ca-certificates are included for data transferring, software repositories management, secure package downloads, and standard SSL/TLS certificates, respectively. Running this command will not cause adverse effects if these packages are installed.

Import Google Chrome APT Repository

A crucial step in installing Google Chrome is importing the GPG key for its digital signature. The GPG key is a form of cryptographic identity that ensures the software you’re about to install is authentic, untouched, and issued by the rightful owner.

Import the GPG key using the following command:

curl -fSsL https://dl.google.com/linux/linux_signing_key.pub | gpg --dearmor | sudo tee /usr/share/keyrings/google-chrome.gpg > /dev/null

With the GPG key in place, we’ll now import the Google Chrome repository. This is the official source from where we’ll download the browser. Execute the following command to accomplish this:

echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list

Update APT Cache After Google Repository Import

Before we install Google Chrome, let’s update our APT sources lists to include the newly added Google repository. Run the following command to do so:

sudo apt update

Finalize Google Chrome Installation via APT Command

Next, we’ll install the stable version of Google Chrome. This is the most tested and reliable version, and it is recommended for most users.

To install Google Chrome Stable, execute the following command:

sudo apt install google-chrome-stable

Optional: Install Google Chrome Beta or Unstable Edition

For some users, the stable version of Google Chrome might not be enough. If you want a sneak peek at the upcoming features before they make their way to the stable version, you might want to install the beta version. However, be aware that the beta version may contain bugs as it’s a preview version still being tested.

To install the Google Chrome Beta build, run the following command:

sudo apt install google-chrome-beta

Google offers an unstable version for developers or those who love being on the cutting edge. This version includes the latest features, but they are experimental and may have some bugs or even lead to crashes.

To install the Google Chrome Unstable version, use the following command:

sudo apt install google-chrome-unstable

Note that installing the beta or unstable versions will not replace your stable version since the system installs these versions separately. This approach lets your system have multiple Google Chrome versions to cater to different needs.

Method 2: Install Google Chrome via Flatpak and Flathub

Flatpak, an innovative package management system designed for Linux, ensures application compatibility across various distributions. It encapsulates applications in isolated environments, reducing conflicts with system libraries. Meanwhile, Flathub is the central repository for Flatpak applications, providing a user-friendly platform with numerous ready-to-deploy applications. It is an excellent secondary method for installing Google Chrome on your Ubuntu system.

Note: If you are unfamiliar with installing Flatpak, kindly refer to our comprehensive guide on installing Flatpak on Ubuntu, which utilizes the official LaunchPAD PPA provided by the Flatpak team.

Enable Flathub For Google Chrome

Before proceeding, it is imperative to activate the Flathub repository on your system. This will grant access to its extensive list of applications, including Google Chrome.

To activate the Flathub repository, input the following command in your terminal:

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

This command integrates the Flathub repository into your Flatpak configuration, setting the stage for various application installations.

Proceed with Google Chrome Installation via Flatpak Command

With the Flathub repository in place, you can install Google Chrome. The flatpak install command is instrumental in this process.

Installing the Stable Version of Google Chrome

For routine usage, the stable version of Google Chrome is advisable. This version promises a consistent and reliable browsing experience backed by thoroughly tested features. To install the stable version, execute the following command:

flatpak install flathub com.google.Chrome -y

Installing the Unstable Version of Google Chrome

Google Chrome provides an Unstable version for those keen on exploring cutting-edge features. While it offers a sneak peek into the latest features, it may be unstable. To install this version, run the command:

flatpak install flathub com.google.ChromeDev

It’s pertinent to note that, as of now, the Flatpak and Flathub systems do not support a beta version of Google Chrome. Thus, users can only opt between the stable and unstable versions when using this installation method.

Launching Google Chrome

CLI Methods to Launch Google Chrome

The Command-Line Interface (CLI) is preferred by users comfortable with terminal commands or those managing a server without a graphical interface. Each variation of Google Chrome has a specific command for activating it.

To engage the stable release of Google Chrome, execute the following:

google-chrome

For users keen on probing features still in the testing phase, the beta release of Google Chrome can be activated with:

google-chrome-beta

For enthusiasts eager to explore the most recent, albeit potentially unstable features, the command is:

google-chrome-unstable

The activation commands differ slightly if you’ve integrated Google Chrome through the Flatpak method.

To start the stable iteration of Google Chrome, use:

flatpak run com.google.Chrome

To engage the experimental version, the required command is:

flatpak run com.google.ChromeDev

GUI Method to Launch Google Chrome

To open Google Chrome using the GUI, follow these steps:

  1. Click on ‘Activities’ located at the top-left corner of your screen.
  2. Next, click ‘Show Applications,’ typically represented by a grid of dots at the screen’s bottom-left corner.
  3. Finally, look for ‘Google Chrome’ among the applications. If you have multiple versions installed, they will be listed as ‘Google Chrome (Stable),’ ‘Google Chrome (Beta),’ and ‘Google Chrome (Unstable).’ Click on the one you wish to launch.
Google Chrome Web UI on Ubuntu
Google Chrome Web UI on Ubuntu

Additional Google Chrome Commands

Update Google Chrome

Google Chrome receives frequent updates to introduce new features, fix bugs, and patch security vulnerabilities. Ensuring your browser is up-to-date is crucial for a smooth and secure browsing experience.

We will utilize Ubuntu’s built-in Advanced Package Tool (APT) to update Google Chrome. First, update the package list on your Ubuntu system by running the following command in your terminal:

sudo apt update

This command fetches the latest package information from all configured sources, including the Google Chrome repository we added earlier.

Following this, you might need to upgrade your system’s packages. You can do this by executing the command:

sudo apt upgrade

This command will upgrade all outdated packages on your system. However, if you wish to specifically update Google Chrome, use the following command:

sudo apt upgrade google-chrome-stable

This command directs APT to only upgrade the google-chrome-stable package, leaving the rest of your system’s packages untouched.

For Flatpak installations, just run the following command that will blanket check for available updates for all Flatpak installations such as Google Chrome stable or Dev:

flatpak update

Remove Google Chrome

APT Remove Commands of Google Chrome

There might be instances where you need to uninstall Google Chrome from your Ubuntu system. Perhaps you’re troubleshooting an issue or want to switch to a different browser.

The command to remove Google Chrome is as follows:

sudo apt remove google-chrome-stable

If you’ve installed the beta or unstable builds of Google Chrome, you can remove them with the following commands:

sudo apt remove google-chrome-beta
sudo apt remove google-chrome-unstable

Finally, if you wish to remove the Google Chrome repository from your system entirely, use the following command:

sudo rm /etc/apt/sources.list.d/google-chrome.list

This command removes the file that contains the Google Chrome repository information, effectively removing the repository from your system.

Flatpak Remove Commands of Google Chrome

If you’ve opted for the Flatpak route to integrate Google Chrome into your system, the uninstallation procedure varies a bit:

flatpak uninstall com.google.Chrome

For those who ventured with the experimental edition:

flatpak uninstall com.google.ChromeDev

Fix Terminal Error: Multiple Google Chrome Source Lists

Ubuntu allows the installation of all three Google Chrome builds: stable, beta, and unstable. However, it’s crucial to note that each installation creates a new source list file in your /etc/apt/sources.list.d/ directory. This scenario could confuse the APT package manager during updates, as it may encounter multiple source lists for Google Chrome, and some will be ignored.

Do not worry; the solution is straightforward.

Remove Extra Source Lists for Google Chrome

Firstly, you must remove the surplus source lists and retain only the original ones. You can accomplish this by running the following command:

sudo rm /etc/apt/sources.list.d/google*

This command removes all source lists that start with “google” in the /etc/apt/sources.list.d/ directory. If you accidentally delete them all, don’t panic. You can recreate the required source list with the next step.

Re-Add Google Chrome Repository

Now that the surplus source lists have been dealt with, let’s re-add the Google Chrome repository. Use the following command to accomplish this:

echo deb [arch=amd64 signed-by=/usr/share/keyrings/google-chrome.gpg] http://dl.google.com/linux/chrome/deb/ stable main | sudo tee /etc/apt/sources.list.d/google-chrome.list

This command creates a new source list for the Google Chrome repository in the /etc/apt/sources.list.d/ directory.

Update APT Package Lists for Google Chrome Fix

The final step is to update the APT package lists. By doing this, APT will recognize the new (or restored) Google Chrome repository. To do so, run:

sudo apt update

This command instructs APT to update its package lists, including the Google Chrome one we restored.

Closing Thoughts

Installing Google Chrome on your Ubuntu system via Google’s APT repository gives you access to the most current versions, with the flexibility to choose between stable, beta, and dev builds. For users who prefer a more isolated environment, the Flatpak method from Flathub offers an alternative with the stable and unstable builds available. Regular updates through these methods ensure that your Chrome installation remains secure and equipped with the latest features, providing a robust and flexible browsing experience on Ubuntu.

Useful Links

Here are some useful links related to using Google Chrome:

  • Chrome Web Store: Visit the Chrome Web Store to explore and download various extensions and themes for Google Chrome.
  • Chrome Web Store Extensions: Browse the extensive collection of extensions available on the Chrome Web Store to enhance your browsing experience.
  • Chrome Web Store Themes: The Chrome Web Store offers a wide range of themes to customize the appearance of your browser.
  • Google Chrome Community Support: Join the Google Chrome community support forum to ask questions, share solutions, and get help from other Chrome users.

4 thoughts on “How to Install Google Chrome on Ubuntu 24.04, 22.04, or 20.04”

    • Hi Arnfinn,

      Actually, maybe just run the ping command like:

      ping dl.google.com

      Also, you did install the initially required packages?

      sudo apt install curl software-properties-common apt-transport-https ca-certificates -y

      Re-tested using a VPN connection, works fine, it will be something minor i suspect.

      Hope it works out.

      Reply

Leave a Comment