Google Chrome is a cross-platform, fast, secure web browser developed by Google. Chrome is a free software, but is not open-source. Chrome is based on the open-source Chromium project.
This tutorial shows how to install Google Chrome on Ubuntu 22.04.
Install Google Chrome
Download GPG key by using the following command:
sudo wget -qO /etc/apt/trusted.gpg.d/google_linux_signing_key.asc https://dl.google.com/linux/linux_signing_key.pub
Add the Google Chrome repository:
echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
Update the package lists and install Google Chrome:
sudo apt update
sudo apt install -y google-chrome-stable
When installation is completed, we can check Google Chrome version:
google-chrome --version
Testing Google Chrome
We can run the Google Chrome in a headless environment. The following command captures a screenshot of a page. The screenshot is saved as a test.png
file in the current working directory.
google-chrome --headless --disable-gpu --screenshot=test.png --window-size=1920,1080 https://www.google.com
Uninstall Google Chrome
If you want to completely remove Google Chrome and related dependencies, execute the following command:
sudo apt purge --autoremove -y google-chrome-stable
Remove GPG key and repository:
sudo rm -rf /etc/apt/trusted.gpg.d/google_linux_signing_key.asc
sudo rm -rf /etc/apt/sources.list.d/google-chrome.list
Leave a Comment
Cancel reply