Summary of How to Install Chrome in Ubuntu

Chrome is now almost the only browser that dominates the market. Although I still use Firefox, everyone uses Chrome. Sometimes, when I need to verify user information, I have to install Chrome on my work computer.

This article describes the installation and update settings for Chrome in Ubuntu. RPM-based distributions follow a similar setup.

Installation Method 1

The most recommended method for first-time installation is to download the installation package directly from the Google Chrome official website. It's simple and straightforward. There are reasons for this recommendation, which will be explained later.

download chrome

After downloading the deb package, install it directly:

1sudo dpkg -i google-chrome-stable_current_amd64.deb

As expected, you should now be able to use Chrome normally, so there's no need for further exploration for average users.

Careful users will notice a note on the download page:

google chrome repo

Note: Installing Google Chrome will add the Google repository so your system will automatically keep Google Chrome up to date. If you don't want Google's repository, do "sudo touch /etc/default/google-chrome" before installing the package.

This text explains the additional behavior of this DEB package. Simply put: it automatically adds the source files from the Google Chrome repository to your system's source directory and modifies related files. The next time you update your system or manually run sudo apt update, Chrome will automatically be upgraded.

If you don't like this default behavior, you can create this file first by running sudo touch /etc/default/google-chrome. This way, when the installation package detects the existence of this file, it won't add the Chrome source files and other related files. The next time you want to update Google Chrome, you'll have to download the DEB package again, which is less convenient than the automatic installation method.

The curious might be asking:

What are the files in the /etc/default directory used for?

These files are generally used to configure the default behavior of related programs. These files are typically read by startup control programs and installation packages. For example, the GRUB configuration:

 1➜ egrep -v '^#|^$' /etc/default/grub
 2GRUB_DEFAULT="0"
 3GRUB_TIMEOUT_STYLE="menu"
 4GRUB_TIMEOUT=2
 5GRUB_DISTRIBUTOR="`lsb_release -i -s 2> /dev/null || echo Debian`"
 6GRUB_CMDLINE_LINUX_DEFAULT=""
 7GRUB_CMDLINE_LINUX=""
 8GRUB_GFXMODE="1920x1440x32"
 9export GRUB_COLOR_NORMAL="light-gray/black"
10export GRUB_COLOR_HIGHLIGHT="magenta/black"
11GRUB_THEME="/boot/grub/themes/ubuntu-/theme.txt"

Readers can search and verify this information on their own.

  • Chrome deb What source files does the installation package create?

After continuous testing, I found that the official Chrome installation package automatically creates the following source files by default (this is for the convenience of ordinary users):

  • /etc/apt/trusted.gpg.d/google-chrome.gpg

GPG trust file, which allows the Ubuntu system to trust Google's source repository.

1➜ gpg google-chrome.gpg
2gpg: WARNING: no command supplied. Trying to guess what you mean...
3pub rsa4096 2016-04-12 [SC]
4EB4C1BFD4F042F6DDDCCEC917721F63BD38B4796
5uid Google Inc. (Linux Packages Signing Authority) <linux-packages-keymaster@google.com>
6sub rsa4096 2016-04-12 [S] [expired: 2019-04-12]
7sub rsa4096 2017-01-24 [S] [expired: 2020-01-24]
8sub rsa4096 2019-07-22 [S] [expired: 2022-07-21]
9sub rsa4096 2021-10-26 [S] [expires: 2024-10-25]
  • /etc/apt/sources.list.d/google-chrome.list

Source file, tells the package manager where to download updates.

1➜ cat google-chrome.list
2### THIS FILE IS AUTOMATICALLY CONFIGURED ###
3# You may comment out this entry, but any other modifications may be lost.
4deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
  • /etc/default/google-chrome

This file is automatically created during the first installation. Its purpose is explained above.

1➜ default cat /etc/default/google-chrome
2repo_add_once="false"
3repo_reenable_on_distupgrade="true"

As for the meaning of the two configuration items in this file, you can refer to this link. It's well-intentioned.

Installation Method 2

A full command-line installation is essentially a manual repetition of the above steps. The advantage is that you can fix potential issues and understand the underlying principles.

  • Add the authorization key
1wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add -

This actually adds the file /etc/apt/trusted.gpg.d/google-chrome.gpg

apt-key add - means reading from standard input.

  • Add the source file
1echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list

This is very simple, and Linux users should understand it, so I won't explain it in detail.

  • Installation
1sudo apt-get update
2sudo apt-get install google-chrome-stable

Note that the package name is google-chrome-stable

Of the two methods, method 1 is obviously more convenient. After all, not everyone is interested in exploring the behavior of the Chrome installation package.

Derivative Method 3

1wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
2sudo dpkg -i google-chrome-stable_current_amd64.deb

This method is essentially the same as method 1, but assumes that the download path https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb never changes. It's also difficult for the average person to remember a long download address, making it less useful.

Common Chrome Upgrade Failure Issues

For general daily use, the upgrade should work properly using any of the above installation methods. If you're currently using Chrome during the upgrade, you'll need to restart it for the update to take effect.

upgrade chrome

Once you understand the principles above, common issues can be easily addressed:

  • Missing/duplicated source files

Add/delete as described above

  • Missing authorization files

Add as described above

These issues typically only occur when upgrading the system. The key solution is to ensure that the authorization files and source files exist.

How to Uninstall Chrome

Cleanup

1sudo apt purge google-chrome-stable
2sudo apt autoremove

Uninstall

1sudo apt remove google-chrome-stable

Differences between the two:

  • apt remove removes the package but retains the software configuration files.

  • apt purge removes both the package and the software configuration files.

Finally, at the time of writing this article, the relevant information on the Chinese Internet World was not comprehensive. While it's not exactly high-quality, high-tech stuff, I'm not exaggerating. If you don't believe me, you can search for it. I used the two removal methods above to test and verify them repeatedly, which was time-consuming and laborious. I did this out of curiosity, firstly; secondly, to write truly useful Chinese materials to enrich the Chinese community, rather than plagiarize without any personal thought. This sentiment has grown stronger as I've maintained this blog for a while now. Thirdly, I want to share my knowledge for the benefit of ordinary Linux users (think of the selfless contributors to the arch wiki).

Lastmod: Saturday, August 2, 2025

See Also:

Translations: