How to Install Chrome browser on Rocky Linux or Alma Linux

Image by vectorjuice on Freepik

It’s no secret that Google Chrome is the most popular web browser out there. Therefore, it is obvious that you want to know how to install it on RHEL-based systems like Rocky Linux 9 / Alma Linux 9. This is what the post is about, but showing several methods to get the result.

Google Chrome is Google’s web browser that comfortably dominates the market today. Its great plugin support, its integration with Google services and its different versions make it the ideal choice for many.

This web browser, although resource intensive, is also very fast in loading websites and because it has a lot of customization and developer tools.

Rocky Linux 9 / Alma Linux 9 includes Firefox by default in its installations, but it is possible to have more web browsers to get different experiences.

Install Google Chrome on Rocky Linux 9 / Alma Linux 9

As you can understand, Google Chrome is not present by default in the official repositories of any distribution, but there are different ways to install it.

So let’s explore each of these ways.

Method 1: Using the official Google repository for RPM distributions

The first method is to add the Google repository for distributions that use RPM packages, such as Rocky Linux 9 / Alma Linux 9. This method is simple but makes sure we always have the latest stable version of the program.

First, open a terminal and update the system:

sudo dnf update

Then, you have to add the GPG key from the Google repository. First, set the key policy to LEGACY.

sudo update-crypto-policies --set LEGACY

Thereafter, you have to download the GPG key and add it to the system. To achieve this, run this pair of commands.

wget https://dl.google.com/linux/linux_signing_key.pub
sudo rpm --import linux_signing_key.pub

Now all that remains is to add the repository to the system. To achieve this, create the repository configuration file.

sudo vim /etc/yum.repos.d/google-chrome.repo

Then, add the following information to add the repository

[google-chrome]
name=google-chrome
baseurl=http://dl.google.com/linux/chrome/rpm/stable/x86_64
enabled=1
gpgcheck=1
gpgkey=https://dl.google.com/linux/linux_signing_key.pub

Save the changes and close the editor.

Now update the system again

sudo dnf update

In the end, you can install Google Chrome on Rocky Linux 9 / Alma Linux 9 by running

sudo dnf install google-chrome-stable

At the end of the process, you can run it from the main menu or from the console with the command

google-chrome-stable

This is enough.

Google Chrome running on Rocky Linux 9 / Alma Linux 9
Google Chrome browser running on Rocky Linux 9 / Alma Linux 9

Method 2: Using Flatpak to achieve the goal

The default desktop environment in Rocky Linux 9 / Alma Linux 9 is GNOME, and one of its main advantages is that Flatpak is already installed by default.

So, the process is simple because you only have to add the Flathub repository, which is where Google Chrome is hosted.

In case you do not have Flatpak installed, you can do it by executing this command in the terminal

sudo dnf install flatpak

Then add the Flathub repository

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

So that you only have to run

flatpak install flathub com.google.Chrome

You can also run it from the main menu or with the command prompt

flatpak run com.google.Chrome

This process not only guarantees you the latest stable version of Chrome, but is also more secure because Flatpak is isolated from the system.

On the other hand, this package is not official, so you have to be cautious when using it.

Method 3: Download and install Google Chrome using the RPM package

A third way to install is to do it directly, use the package that can be downloaded from Google’s website.

First, you can visit this link to access the download

Chrome download website
Chrome download website

Click on the Download Chrome button, and you will see a screen where you will be shown two download options: a DEB package (Debian and Ubuntu) and RPM (Fedora and the rest). Select the latter.

Chrome packages
Chrome packages

When the download is finished, you will be able to install the package. If you prefer the graphical interface, then open your browser and go to Downloads and you can double-click on it.

The other option is to do it from the terminal. To achieve this, open it and run.

cd ~/Downloads
sudo rpm -ivh google-chrome-stable_current_x86_64.rpm

When the process is finished, you will be able to run it from the main menu of the distribution.

Remove Google Chrome on Rocky Linux 9 / Alma Linux 9

If you would rather not use the browser anymore, you can remove it without too much trouble. It all depends on the installation method you have used.

Using installation method 1

In this case, you can open a terminal and run

sudo dnf remove google-chrome-stable

This way it will be removed from the system for good.

But it is also a good idea to remove the repository to avoid having it added in vain. To achieve this, simply delete the configuration file.

sudo rm /etc/yum.repos.d/google-chrome.repo

Then, refresh the system

sudo dnf update

Now neither Google Chrome nor its repository is on the system.

For installation method 2

In this method, we will use Flatpak to uninstall it. In this case, just run.

flatpak uninstall com.google.Chrome

This way, you will be able to get rid of Chrome as fast and easy as that.

If you have used installation method 3

If you have installed Chrome with this method, then you can also remove it from the terminal by running

sudo dnf remove google-chrome-stable

This is enough.

Conclusion

Google Chrome is, for many, the best web browser out there, and that is why many Linux users are concerned about how to install it on the different distributions there are.

I hope you liked it, and you can share this post and spread it.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top