How to install google chrome on Ubuntu image

How To Install Google Chrome and Chromium in Ubuntu With CLI in 4 Steps

GOOGLE CHROME

Google Chrome is a powerful web browser software application with a straight forward installation. It is very popular due to it highly fast, secure and cool features capability that enhance browsing experience. The Google Chrome functionality can be extended by installaling various plugins some of which can be premium, and many more are free to use. It is not a open-source application like the Chromium. In addition, Google Chrome can be installed on many operating systems including Windows, Mac, and Linux distributions for free, however, installing on an Ubuntu server like the one deployed on an EC2 instance requires knowing the how to install Google Chrome using the CLI.

CHROMIUM

Chromium on the other hand is an open-source version of google chrome, this means it can be used on likewise open-source software or where needed.

And, while the Chromium is easily accessible from the Ubuntu market place using the Ubuntu Graphical User Interface, Google Chrome is not available, and so, the need for to install google chrome using the command line interface (CLI).

UBUNTU

Ubuntu is one of the Linux Distribution (Linux Distros) open-source operating system. Developed by a british company called Canonical in collaboration with some other individual software developers, and with its powerful command line interface (CLI), it has become a prefer operating system for both cloud professionals and many IT professionals alike.

WHY DO YOU NEED TO INSTALL GOOGLE CHROME IN UBUTU WITH CLI

The Ubuntu’s use case can involve the use of the Google Chrome web browser. I got to know about this used case when one of my colleague, a DotNet developer tries to include a html-pdf converter package in his code. It helps generate a report from the application activities. He got in touch with me to assist with preparing the server for the chrome app or any web browser for the package to function well.

So, I got my Cloud cap on, and truth to it, it took a couple of minutes to install google chrome on the Ubuntu and then install the open-source chromium version.

THE PROCESS, LET’S GO

Here, we will go through the process. I have also attached the screenshots to help compare the results.

Here we go with the how to install google chrome and chromium on Ubuntu in 5 easy steps.

STEP 1.

We start by installing the debian package using the wget utility

$ sudo wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
STEP 2
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
Install google chrome and chromium in ubuntu with cli in oxla.io
STEP 3

After the second step, In case you got an error like the one in the screenshot below, you can resolve it by running

$ sudo apt -f install

Also, update the apt repository package, so that you machine pick up the changes.

$sudo apt update

You can also optionally run the apt upgrade command, so tha the package are all up to date.

$ sudo apt upgrade

You can the rerun the the dpkg command in step 2.

Install google chrome and chromium in ubuntu with cli in oxla.io

Congratulations, you have successfully install google chrome on your Ubuntu Linux machine using the command line interface (CLI)

Important note after you are done installing google chrome, you may encounter no sandbox is not supported with sudo error when accessing google chrome especially for you application. You can fix chrome no sandbox is not support with sudo error in Ubuntu linux with a simple change.

Add this line to the bottom of the /usr/bin/google-chrome.

$sudo nano /usr/bin/google-chrome

exec -a "$0" "$HERE/chrome" "$@" --no-sandbox

Now that you added the snipet, save exit the file with Ctrl X Y and hit the Enter button.

Install google chrome and chromium in ubuntu with cli in oxla.io

The second option to resolve is to also install the missing packages that could also cause the error from apt repository. You likely will have some packages installed like the first screenshot, however, apt will let you know of the ones to be installed like the second image.

$ sudo apt-get install gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget
Resolve sandbox error with apt package installation
Resolve sandbox error with apt package installation oxla.io
INSTALL CHROMIUM WITH CLI

To install the chromium browser is a very straight forward process. You will need to run the apt command in your Ubuntu terminal window.

$ sudo apt install -y chromium-browser
Install google chrome and chromium in ubuntu with cli

Good you have come this far. Now you know how to install google chrome and chromium in Ubuntu in 5 steps. I trust you will have a good experience with this piece of software just like I did.

What is your experience with google chrome and chromium in Ubuntu or any other operating system? Drop you comment in the chat below. Share this information among your circles.


Posted

in

by

Tags:

Comments

Leave a Reply

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