IBM Cloud Docs
Getting started with the IBM Cloud CLI

Getting started with the IBM Cloud CLI

In this tutorial, you install the the latest version of the stand-alone IBM Cloud® Command Line Interface.

Want to start working with the IBM Cloud CLI? Try out IBM Cloud Shell, which gives you a personal cloud-based shell workspace with the full IBM Cloud CLI and tons of command line tools - no installation needed. To get started, click the Cloud Shell icon IBM Cloud Shell icon in the IBM Cloud console menu bar. For more information, see Getting started with IBM Cloud Shell.

Before you begin

  • Depending on your IBM Cloud® account type, access to certain resources might be limited or constrained. Depending on your plan limits, certain capabilities that are required by some toolchains might not be available. For more information, see Setting up your IBM Cloud account.
  • For Linux™, install the curl command for downloading packages through the command line. If curl is already installed, the installer updates it to the latest version.

If you need to use a 32-bit version of the CLI, or a previous version other than the latest for IBM Cloud dedicated environments, see IBM Cloud CLI releases.

Run the installation command

The latest version of the IBM Cloud CLI is installed when you run the command. As the CLI installs, keep an eye on the command line to authenticate as needed.

  • For MacOS, run the following command:

    curl -fsSL https://clis.cloud.ibm.com/install/osx | sh
    
  • For Linux™, run the following command:

    curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
    
  • For Windows™, run the following command in PowerShell as an administrator:

    iex (New-Object Net.WebClient).DownloadString('https://clis.cloud.ibm.com/install/powershell')
    

    To open PowerShell, right-click the Windows™ PowerShell icon, and select Run as administrator.

  • For WSL2 on Windows™, run the following command:

    curl -fsSL https://clis.cloud.ibm.com/install/linux | sh
    

Verify the installation

To verify that the CLI was installed successfully, run the help command:

ibmcloud help

The output lists the usage instructions, the current version, and the supported commands.

Install CLI plug-ins and tools

To manually install the CLI plug-ins and tools, see Extending IBM Cloud CLI with plug-ins.

Configure your environment

Log in to IBM Cloud with your IBMid. If you have multiple accounts, you are prompted to select which account to use. If you do not specify a region with the -r flag, you must also select a region.

ibmcloud login

If your credentials are rejected, you might be using a federated ID. To log in with a federated ID, use the --sso flag. See Logging in with a federated ID for more details.

Next steps

If you installed the CLI plug-ins and tools, you can start using IBM Cloud resources and services on the CLI. For more information, see General IBM Cloud CLI (ibmcloud) commands. Also, keep in mind the Getting help and support page if you have questions or problems.

Stay up to date with the IBM Cloud CLI by subscribing to the IBM Cloud CLI releases repository. You'll receive notifications about new IBM Cloud CLI releases.

IBM Cloud CLI supports a plug-in framework to extend its capability. Discover and install new CLI plug-ins!

Need a hand with remembering IBM Cloud CLI commands? Print the IBM Cloud CLI quick reference to keep commands for common tasks at your fingertips.