copyright | lastupdated | keywords | subcollection | ||
---|---|---|---|---|---|
|
2021-02-10 |
IBM Cloud CLI, IBMCLOUD_HOME, ibmcloud cli, ibmcloud |
cli |
{:shortdesc: .shortdesc} {:screen: .screen} {:codeblock: .codeblock} {:pre: .pre} {:note: .deprecated} {:external: target="_blank" .external}
{: #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}.