Install Google Chrome in Ubuntu Using Terminal
Learn to install Google Chrome on Ubuntu using the command line.
Google Chrome is the most used web browser. And why not? I mean, if you ignore its close-sourced nature, it is an excellent browser.
But the thing is how you install Google Chrome in Ubuntu—especially using the terminal.
Well, there are two ways by which you can install Google Chrome in Ubuntu:
- Installing the Google Chrome deb file (recommended)
- Using the flatpak
Let's start with the first one.
Method 1: Install Google Chrome using .deb file
This is what I will recommend to every user and there are two simple reasons why:
- Will be updated during the system update. No special steps needed
- No other package manager is required
First, download the .deb
file of Google Chrome using the wget command as shown:
wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
Once done, install the .deb
package using the dpkg command:
sudo dpkg -i google-chrome-stable_current_amd64.deb
That's it!
Remove Google Chrome
To remove Google Chrome that was installed via the above method, use this command:
sudo apt remove google-chrome-stable
Method 2: Install Google Chrome using Flatpak
For those who don't know, flatpak is a package manager meant to install and manage packages across all Linux distributions in the easiest way possible.
The main pro of using this method is you don't require any superuser privileges to install and use flatpak on any Linux distribution.
So in this section, I will walk you through how you can set up flatpak in Ubuntu and then install Google Chrome.
Setup Flatpak in Ubuntu
First, install the flatpak in Ubuntu using the following command:
sudo apt install flatpak
Once done, add the Flathub repository using the following command:
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
Finally, reboot your system to use flatpak.
Install Google Chrome in the Ubuntu terminal
Once you are done with flatpak setup, you can install Google Chrome using a single command:
flatpak install flathub com.google.Chrome
Yep, that's all it takes you to install Google Chrome with flatpak.
More on flatpak
What to know what is flatpak and how it is known as a "Universal package manager"? Refer to our detailed guide on that topic:
Here's how to use Flatpak in Ubuntu and other Linux distributions:
I hope you will find this guide helpful.
A software engineer who loves to tinker with hardware till it gets crashed. While reviving my crashed system, you can find me reading literature, manga, or watering my plants.