Customize Consent Preferences

We use cookies to help you navigate efficiently and perform certain functions. You will find detailed information about all cookies under each consent category below.

The cookies that are categorized as "Necessary" are stored on your browser as they are essential for enabling the basic functionalities of the site. ... 

Always Active

Necessary cookies are required to enable the basic features of this site, such as providing secure log-in or adjusting your consent preferences. These cookies do not store any personally identifiable data.

No cookies to display.

Functional cookies help perform certain functionalities like sharing the content of the website on social media platforms, collecting feedback, and other third-party features.

No cookies to display.

Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics such as the number of visitors, bounce rate, traffic source, etc.

No cookies to display.

Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.

No cookies to display.

Advertisement cookies are used to provide visitors with customized advertisements based on the pages you visited previously and to analyze the effectiveness of the ad campaigns.

No cookies to display.

Skip to content

GCP cli configuration on linux

GCP cli configuration on linux
Share

Reading Time: 2 minutes

In this tutorial “GCP cli configuration on linux”. We will show you how to download, Install, and configure GCP CLI on a Linux host. Once you configure you would be able t use gcloud cli and commands.

What is GCP

Google Cloud Platform, offered by Google, is a suite of cloud computing services that provides a series of modular cloud services including computing, data storage, data analytics, and machine learning, alongside a set of management tools.

How to Download Google CLI

Login to your Linux Machine or Server then use curl command as mentioned below. It will download GCP CLI installer package.

In this case, we are downloading in the home directory of the user we logged in, In your case you can log in as non root user, If you want to create non root linux user , Please go through the steps mentioned here.

GCP cli configuration on linux

$ cd ~

$ curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-450.0.0-linux-x86_64.tar.gz

$ tar -xf google-cloud-cli-450.0.0-linux-x86_64.tar.gz

cd /home/tetertechie1/google-cloud-sdk

Follow the Below and Type “Y”

Do you want to help improve the Google Cloud CLI (y/N)? N

Do you want to continue (Y/n)? – Y

GCP cli configuration on linux

$ ./google-cloud-sdk/bin/gcloud init

You will get the URL on your terminal, Copy the URL open it in the browser, and log into the Google Cloud console, You will get the Authorization code copy the same code and Enter in the Terminal as shown below.

Enter authorization code:

Do you want to configure a default Compute Region and Zone? (Y/n)? Y

gcloud auth login –no-launch-browser

Validate GCP CLI

$ cd /home/tetertechie1/google-cloud-sdk/bin

$ ./gcloud compute instances list

Create gcloud alias

vi .bash_profile

Add Below and save file.

alias glcoud=’/home/tetertechie1/google-cloud-sdk/bin/gcloud

Add gcloud absolute path that you have in your host, DO NOT delete this path.

source .bash_profile

Conclusion:

We hope you are able to use GCP GCI after going through GCP cli configuration on linux tutorial and this “GCP cli configuration on linux” tutorial helped you/.


Share

Leave a Reply

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

?>