How to Install Google Chrome using the Linux Terminal

How to Install Google Chrome using the Linux Terminal

Using the terminal is pretty cool, right?

  1. Open the Terminal Window. You can do this by either using the GUI or pressing CTRL + ALT + T.

  2. Update and upgrade your system.
    To do this, run the following command in your terminal:

     sudo apt update && sudo apt upgrade -y
    

    The -y flag, alternatively --assume-yes or --yes, automatically makes your answer to any prompts yes. This allows you to install packages non-interactively.

    If an undesirable situation occurs, such as: changing a held package, trying to install an unauthenticated package, or removing an essential package, the apt will abort.

    If you are unfamiliar with the commands apt update and apt upgrade, click this.

  3. You need to confirm whether you have wget installed it on your PC.
    wget is a tool created by the GNU project and it allows you to retrieve content and files from various web servers. To check if it's installed, run:

     wget --version
    

    If you see a version number, you are set to go.
    If you get an error, it's because wget is not installed. To install wget, run:

     sudo apt install wget
    
  4. Download the Chrome package using wget.
    There's no longer a 32-bit version of Chrome, so we'll be installing the 64-bit version.
    To get the latest stable version, run:

     wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    

    Be patient while the package is downloading.

  5. Install the Chrome package using dpkg.

    dpkg is the default package manager on Ubuntu. You use dpkg to install, configure, upgrade, or remove packages, and retrieve information about these packages.

    To install the Chrome package, run:

     sudo dpkg -i google-chrome-stable_current_amd64.deb
    
  6. Fix the errors that occurred during installation. To do this, run:

     sudo apt-get install -f
    
  7. Launch Google Chrome.
    You have installed the browser. To launch it, you either use the GUI or run the following command in your terminal:

     google-chrome
    

References

  1. https://manpages.ubuntu.com/manpages/trusty/man8/apt-get.8.html

  2. https://askubuntu.com/questions/94102/what-is-the-difference-between-apt-get-update-and-upgrade/94104#94104

  3. https://www.hostinger.com/tutorials/wget-command-examples/

  4. https://support.google.com/chrome/a/answer/7100626