How to install Google Chrome on Rocky Linux

Endrit Qerreti

Endrit Qerreti

In this tutorial, you will learn how to install Google Chrome on Rocky Linux.

Google chrome is not included by default on Rocky Linux, which means after a fresh install of Rocky Linux, in order to use Google chrome, you must install it manually.

Installing Google chrome on Rocky Linux, can be done directly from the terminal, by downloading the Google chrome rpm binary from the official Google chrome linux repository.

So, let's install Google Chrome on Rocky Linux.

Step 1 - Update Rocky Linux system

Before installing Google chrome on Rocky Linux, ensure that your machine is up to date.

If you are running outdated packages on your Rocky Linux machine, you need to update them before proceeding to install Google chrome.

To update Rocky Linux, you can do so by using the dnf package manager.

To do so, simply run the command below.

sudo dnf upgrade --refresh

Step 2 - Import Google Chrome GPG Key on Rocky Linux

Once you have updated your Rocky Linux system, you can proceed to download Google chrome GPG key and import it on your system.

To do so, simply execute the command below.

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

💡
Note: If you encounter an error when importing Google Chrome gpg key, you need to set the crypto-policies to LEGACY. To do so, simply run this command sudo update-crypto-policies --set LEGACY, then import the gpg key again.

Step 3 - Install Google Chrome on Rocky Linux

Now that your Rocky Linux system is up to date, and Google Chrom GPG key is also imported, you can proceed to install Google chrome on your system.

To install Google Chrome on Rocky Linux, you can do so by using dnf package manager.

sudo dnf install -y https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm 

Note: We are installing the stable version of Google Chrome on our Rocky Linux machine. However, you can also install developer or beta version.

Install Google chrome Developer version on Rocky Linux

sudo dnf install -y https://dl.google.com/linux/direct/google-chrome-unstable_current_x86_64.rpm 

Install Google chrome beta version on Rocky Linux

sudo dnf install -y https://dl.google.com/linux/direct/google-chrome-beta_current_x86_64.rpm 

Step 4 - Launching Google chrome on Rocky Linux

Google chrome is now installed on your Rocky Linux machine. So you should be able to launch Google Chrome and start using it.

Launch Google Chrome via terminal on Rocky Linux

To launch Google chrome via terminal on Rocky Linux, is very easy. Simply open your terminal by pressing CTRL + ALT + T, then run the command below.

chrome

Launch Google Chrome via Applications Menu on Rocky Linux

Terminal is not the only way to launch Google chrome on Rocky Linux. You can also choose to not use terminal, and launch Google Chrome via applications menu on your Rocky Linux system.

To do so, simply open Applications Menu, and locate "Google Chrome" on the apps, or simply search for "Google chrome" on the search box, and then simply click "Google Chrome" , and Google Chrome will start.

Update Google Chrome on Rocky Linux

To keep your Google Chrome browser on Rocky Linux updated, you must check for updates periodically.

Whenever you see that new updates are ready to be installed on your system, you can easily install them directly from the terminal.

To do so, open your terminal, via GUI or by pressing CTRL + ALT + T, and run the command below to update your Rocky Linux system.

sudo dnf upgrade --refresh

Remove Google Chrome on Rocky Linux

Depending on the version of Google Chrome that you installed, removing Google chrome when you no longer need it, can be easily done by using dnf package manager.

For example, to remove Google chrome stable version via dnf, simply run the command below.

sudo dnf remove google-chrome-stable

To remove other versions, such as Developer and Beta version, run the commands below.

sudo dnf remove google-chrome-unstable

sudo dnf remove google-chrome-beta

Once you have removed Google chrome, to avoid your system automatically installing Google chrome in the future, you need to remove Google chrome repository on your Rocky Linux system.

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

To verify that Google chrome repository was removed successfully, you can do so by checking all repos that are active on your Rocky Linux system.

dnf repolist

Output:

[owlhowto@localhost ~]$ dnf repolist
repo id                  repo name
appstream                Rocky Linux 9 - AppStream
baseos                   Rocky Linux 9 - BaseOS
epel                     Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264      Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
extras                   Rocky Linux 9 - Extras

As you can see in the output above, google-chrome repository was successfully removed.

Conclusion

In this tutorial, you learned how to install Google Chrome on Rocky Linux, by using dnf package manager directly from the terminal.