aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
aster.cloud aster.cloud
  • /
  • Platforms
    • Public Cloud
    • On-Premise
    • Hybrid Cloud
    • Data
  • Architecture
    • Design
    • Solutions
    • Enterprise
  • Engineering
    • Automation
    • Software Engineering
    • Project Management
    • DevOps
  • Programming
  • Tools
  • About
  • Engineering

How-To: Install Google Cloud CLI On Ubuntu 22.04

  • aster_cloud
  • October 12, 2022
  • 2 minute read

How to install and use the Cloud SDK for Ubuntu and initialise the sdk using a Google account on Ubuntu 22.04.

Prerequisites

  • Operating System : Ubuntu 22.04
  • Access to a Terminal or Shell Console
  • GCP account for setting up the gcloud locally
  • Web browser for login

Cloud SDK Installation

01. Open a terminal


Partner with aster.cloud
for your next big idea.
Let us know here.


cyberpogo

01. Install required packages

$ sudo apt-get install apt-transport-https ca-certificates gnupg

02. Add the gcloud CLI distribution URI as a package source. If your distribution supports the signed-by option, run the following command:

$ echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] https://packages.cloud.google.com/apt cloud-sdk main" | sudo tee -a /etc/apt/sources.list.d/google-cloud-sdk.list

03. Import the Google Cloud public key.

$ curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo tee /usr/share/keyrings/cloud.google.gpg

04. Update and install the gcloud CLI

$ sudo apt-get update && sudo apt-get install google-cloud-cli

Authenticating via Browser

$ gcloud init

 

08. A link will be displayed, copy it, and open it in the browser,

09. Login using your Google account that has access to GCP.

10. Accept the permission request by selecting the Allow button.

11. It will return a code after allowing the Google Cloud SDK permissions.

12. Paste the verification code on the terminal

13. If you have existing project, you can select from the list to set the project to use or you can select the option Create a new project which is on the last item of the list. In this example we will be using an existing project.

14. Next is to choose default Compute Region and Zone. Enter ‘Y’ if you want, or ‘n’ to pass.

  

15. Setup is now complete and you can now use the gcloud sdk to perform some commands.

Read More  Cloud Domains, Now GA, Makes It Easy To Register And Manage Custom Domains

16. To verify if Google Cloud SDK is installed and your account is configured, you can try the following command. It will show the list of projects with the Project ID, Project Name and Project Number.

$ gcloud projects list

Our humans need coffee too! Your support is highly appreciated, thank you!

aster_cloud

Related Topics
  • CLI
  • Google Cloud
  • Tutorials
  • Ubuntu
You May Also Like
View Post
  • Computing
  • Design
  • Engineering
  • Multi-Cloud

Amazing Federated Multicloud Apps

  • June 2, 2023
View Post
  • Engineering

Resolving Deployment Issues With Ts-node And Azure Development Pipelines

  • June 1, 2023
View Post
  • Design
  • Engineering

Four Steps To Managing Your Cloud Logging Costs On A Budget

  • May 31, 2023
View Post
  • Engineering
  • Tools

Red Hat Puts Podman Container Management On The Desktop

  • May 30, 2023
View Post
  • Engineering
  • Practices
  • Tools

Tricentis Launches Quality Engineering Community ShiftSync

  • May 23, 2023
View Post
  • Design
  • Engineering
  • Public Cloud

Kubernetes Costs Less, But Less Than What?

  • May 18, 2023
View Post
  • Engineering
  • People
  • Platforms

KubeCon Europe 2023 Highlights Kubernetes Explosion And Need For Instant Platform Engineering

  • May 17, 2023
View Post
  • Computing
  • Engineering

Component-Based Development Has Been A Long Time Coming

  • May 16, 2023

Stay Connected!
LATEST
  • 1
    Amazing Federated Multicloud Apps
    • June 2, 2023
  • 2
    What’s The Future Of DevOps? You Tell Us. Take The 2023 Accelerate State Of DevOps Survey
    • June 2, 2023
  • 3
    Resolving Deployment Issues With Ts-node And Azure Development Pipelines
    • June 1, 2023
  • 4
    What To Expect From Apple’s WWDC 2023
    • June 1, 2023
  • 5
    What Is Platform Engineering And Why Adopt It In Your Company?
    • June 1, 2023
  • 6
    Four Steps To Managing Your Cloud Logging Costs On A Budget
    • May 31, 2023
  • 7
    Red Hat Puts Podman Container Management On The Desktop
    • May 30, 2023
  • 8
    The Agile Mindset: A Path to Personal Fulfillment and Growth
    • May 30, 2023
  • 9
    G7 2023: The Real Threat To The World Order Is Hypocrisy.
    • May 27, 2023
  • 10
    Build Next-Generation, AI-Powered Applications On Microsoft Azure
    • May 26, 2023
about
Hello World!

We are aster.cloud. We’re created by programmers for programmers.

Our site aims to provide guides, programming tips, reviews, and interesting materials for tech people and those who want to learn in general.

We would like to hear from you.

If you have any feedback, enquiries, or sponsorship request, kindly reach out to us at:

[email protected]
Most Popular
  • 1
    Huawei OceanStor Pacific Scale-Out Storage Tops IO500 Rankings
    • May 26, 2023
  • 2
    MongoDB And Alibaba Cloud Extend Global Partnership
    • May 25, 2023
  • 3
    Tricentis Launches Quality Engineering Community ShiftSync
    • May 23, 2023
  • 4
    Oracle Cloud Infrastructure Adds To Growing List Of Government Approved Cloud Services
    • May 22, 2023
  • 5
    Huawei And Partners Announce Yucatan Wildlife Conservation Findings
    • May 18, 2023
  • /
  • Technology
  • Tools
  • About
  • Contact Us

Input your search keywords and press Enter.