IBM Cloud Docs
Working with multiple sessions with the IBM Cloud CLI

Working with multiple sessions with the IBM Cloud CLI

You can use the IBMCLOUD_HOME environment variable to work with multiple sessions at the same time in the IBM Cloud® CLI.

With the IBMCLOUD_HOME environment variable, you can set a path for the session metadata. You can specify a different directory for each session, and that's helpful when you want to run multiple IBM Cloud CLI sessions simultaneously.

Before you begin

Setting the IBMCLOUD_HOME environment variable

To run multiple IBM Cloud CLI sessions in parallel, use different environments per session. You need to set up a different configuration directory for each session.

For your first environment, enter the following command:

  export IBMCLOUD_HOME=/home/myuser/.ibmcloudenv1
  ibmcloud login

For your second environment, enter the following command:

export IBMCLOUD_HOME=/home/myuser/.ibmcloudenv2
ibmcloud login

For more information about environment variables for the IBM Cloud CLI, see Tips and Tricks for Using the IBM Cloud CLI and IBM Cloud CLI (ibmcloud) environment variables.