Blog

03/06/2019

How To: Update gcutil / gcloud Components On a Linux / Unix / OS X



How can I update for Google Cloud SDK components on a Linux or OS X unix based systems?

[donotprint][/donotprint]The easiest and recommended way is to use gcloud command to update various Google cloud SDK libs, commands and other components. Open the Terminal and type the following command when you see the following message on screen:

There are available updates for some Cloud SDK components

The command to update gcloud components is as follows:

 gcloud components update

Sample outputs:

The following components will be removed:
    ----------------------------------------------------------------------
    | Big Query Command Line Tool                  |     2.0.17 | 1.3 MB |
    | Cloud SDK Core Libraries                     | 2013.12.06 | < 1 MB |
    | Cloud SDK Core Libraries (Platform Specific) | 2013.11.19 | < 1 MB |
    | Cloud Storage Command Line Tool              |       3.38 | 1.7 MB |
    | Compute Engine Command Line Tool             |     1.12.0 | < 1 MB |
    ----------------------------------------------------------------------
The following components will be installed:
    ------------------------------------------------------------------------------
    | Big Query Command Line Tool                          |     2.0.17 | < 1 MB |
    | Big Query Command Line Tool (Platform Specific)      |     2.0.17 | < 1 MB |
    | Cloud SDK Core Libraries                             | 2014.01.27 | < 1 MB |
    | Cloud SDK Core Libraries (Platform Specific)         | 2014.01.27 | < 1 MB |
    | Cloud SQL Admin Command Line Interface               | 2014.01.28 | < 1 MB |
    | Cloud Storage Command Line Tool                      |       3.42 | 1.8 MB |
    | Cloud Storage Command Line Tool (Platform Specific)  |       3.42 | < 1 MB |
    | Compute Engine Command Line Tool                     |     1.13.0 | < 1 MB |
    | Compute Engine Command Line Tool (Platform Specific) |     1.13.0 | < 1 MB |
    ------------------------------------------------------------------------------
 
Do you want to continue (Y/n)?  y
 
Creating update staging area...
 
Uninstalling: Big Query Command Line Tool ... Done
Uninstalling: Cloud SDK Core Libraries ... Done
Uninstalling: Cloud SDK Core Libraries (Platform Specific) ... Done
Uninstalling: Cloud Storage Command Line Tool ... Done
Uninstalling: Compute Engine Command Line Tool ... Done
 
Installing: Big Query Command Line Tool ... Done
Installing: Big Query Command Line Tool (Platform Specific) ... Done
Installing: Cloud SDK Core Libraries ... Done
Installing: Cloud SDK Core Libraries (Platform Specific) ... Done
Installing: Cloud SQL Admin Command Line Interface ... Done
Installing: Cloud Storage Command Line Tool ... Done
Installing: Cloud Storage Command Line Tool (Platform Specific) ... Done
Installing: Compute Engine Command Line Tool ... Done
Installing: Compute Engine Command Line Tool (Platform Specific) ... Done
 
Creating backup and activating new installation...
 
Done!

Please note that when you update SDK, you may end up losing credentials for the active account. To activate existing user account, use the following command
$ gcloud auth login
Just follow on screen instructions. Use the following command to ssh into Google cloud host:
$ gcutil ssh your-compute-name-here
$ gcutil ssh db2

Posted by: SXI ADMIN

The author is the creator of nixCraft and a seasoned sysadmin, DevOps engineer, and a trainer for the Linux operating system/Unix shell scripting. Get the latest tutorials on SysAdmin, Linux/Unix and open source topics via RSS/XML feed or weekly email newsletter.

20/08/2019

Start your Bitcoin Exchange with our Software

Start your Bitcoin Exchange with our Software Setup your white label bitcoin exchange right away. Or create your own cryptocurrency using...
14/08/2019

How to KVM, QEMU start or stop virtual machine from command line (CLI)

KVM or Kernel Based Virtual Machine is a popular virtualization technology. It allows you to run virtual guest machines over a host machine. To start...
14/08/2019

How to Docker backup Saving and restoring your volumes

Running a Docker volume backup First, we spin up a temporary container, and we mount the backup folder and the target Docker volume to this container....