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

last updated in Categories , , , ,

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

google-cloud-update

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: Vivek Gite

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.

Share this on (or read 0 comments/add one below):