copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2022-02-22 |
IBM Cloud CLI, IBMCLOUD_HOME, ibmcloud cli, ibmcloud |
cli |
{{site.data.keyword.attribute-definition-list}}
{: #ibmcloud-home}
You can use the IBMCLOUD_HOME environment variable to work with multiple sessions at the same time in the {{site.data.keyword.cloud}} CLI. {: shortdesc}
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 {{site.data.keyword.cloud_notm}} CLI sessions simultaneously.
{: #ibmcloud-home-prereq}
- Set up your {{site.data.keyword.cloud}} account{: external}. For more information, see Setting up your {{site.data.keyword.cloud_notm}} account.
- Install the {{site.data.keyword.cloud_notm}} CLI.
{: #ibmcloud-home-usage}
To run multiple {{site.data.keyword.cloud_notm}} 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
{: codeblock}
For your second environment, enter the following command:
export IBMCLOUD_HOME=/home/myuser/.ibmcloudenv2
ibmcloud login
{: codeblock}
For more information about environment variables for the {{site.data.keyword.cloud_notm}} CLI, see Tips and Tricks for Using the {{site.data.keyword.cloud_notm}} CLI{: external} and {{site.data.keyword.cloud_notm}} CLI (ibmcloud) environment variables.