
How to Install Google Chrome on CentOS Stream 10: A Step-by-Step Guide
While CentOS Stream is primarily known as a powerful server operating system, many developers, system administrators, and testers need access to a graphical web browser for a variety of tasks. Whether for application testing, web development, or accessing web-based admin panels, installing Google Chrome can be incredibly useful.
This guide provides two clear and effective methods for installing Google Chrome on your CentOS Stream 10 system.
Prerequisites
Before you begin, ensure you have the following:
- A system running CentOS Stream 10.
- Access to a user account with sudo or root privileges.
- A stable internet connection.
Method 1: Install Chrome Using Google’s Official Repository (Recommended)
This is the best and most common method because it not only installs Chrome but also configures your system to receive automatic updates through the standard dnf update
command. This ensures your browser remains secure and up-to-date.
Step 1: Add the Google Chrome Repository
First, you need to inform your system’s package manager (dnf
) where to find the Google Chrome software. You can do this by creating a repository file.
Open your terminal and create a new file in the appropriate directory using a text editor like nano
or vi
:
sudo nano /etc/yum.repos.d/google-chrome.repo
Next, copy and paste the following content into the file. This configuration points dnf
to Google’s official Linux 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 file and exit the text editor. (In nano
, press Ctrl+X
, then Y
, then Enter
).
Step 2: Install Google Chrome Stable
With the repository now configured, you can install the stable version of Google Chrome with a single command. The system will automatically import the GPG key to verify the package’s authenticity.
Execute the following command in your terminal:
sudo dnf install google-chrome-stable
The package manager will resolve all necessary dependencies and prompt you for confirmation. Press Y
and then Enter
to proceed. Once the process is complete, Google Chrome will be installed on your system.
Method 2: Manual Installation with the RPM Package
If you prefer not to add a repository or need to install Chrome on an offline machine, you can download and install the RPM package directly.
Step 1: Download the Chrome RPM Package
Use the wget
command to download the latest stable version of Google Chrome directly from Google.
Open your terminal and run:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_x86_64.rpm
This will download the file google-chrome-stable_current_x86_64.rpm
into your current directory.
Step 2: Install the Downloaded Package
Now, use the dnf
package manager to install the local RPM file. Using dnf
is beneficial because it will automatically find and install any required dependencies from your configured system repositories.
sudo dnf install ./google-chrome-stable_current_x86_64.rpm
Confirm the installation by pressing Y
when prompted.
Launching and Verifying Your Chrome Installation
After a successful installation, you can launch Google Chrome in two ways:
From the Desktop Environment: Click on “Activities” in the top-left corner, type “Chrome,” and click the Google Chrome icon.
From the Terminal: To launch the browser from the command line, simply type:
google-chrome-stable &
The
&
symbol runs the application in the background, freeing up your terminal for other commands.
A Critical Security Note: Running Chrome as Root
It is a major security risk to run a web browser as the root user. Browsers are complex applications that connect to the internet, making them a potential attack vector. If a vulnerability is exploited while you are running the browser as root, an attacker could gain complete control over your system.
By default, Chrome will refuse to start if you are logged in as root. While it’s technically possible to bypass this with the --no-sandbox
flag, this is strongly discouraged for any purpose other than temporary, isolated container debugging. Always use a standard, non-privileged user account for browsing.
How to Update and Uninstall Google Chrome
Keeping Chrome Updated
If you used Method 1 (the repository method), keeping Chrome updated is simple. It will be updated along with all your other system packages whenever you run a system-wide update:
sudo dnf update
If you used Method 2, you will need to manually re-download and reinstall the latest RPM package to update it.
Uninstalling Chrome
If you no longer need Google Chrome, you can remove it completely with a single command:
sudo dnf remove google-chrome-stable
This command will cleanly uninstall the browser and its associated files from your CentOS Stream 10 system.
Source: https://infotechys.com/install-google-chrome-on-centos-stream-10/