## 3.2.1.2 Setting Up a Trial Account From the Command Line
You can use the command-line interface to set up a trial account. For all tasks on global account and subaccount levels, you use the SAP BTP command-line interface ( btp CLI ). Once you've created a Cloud Foundry environment instance (a Cloud Foundry org), you use the Cloud Foundry CLI (cf CLI). This procedure works without the SAP BTP cockpit (except that you need the global account subdomain to log in, which you may have to look up in the cockpit).
For all tasks on global account and subaccount level, you can use the the btp CLI instead of the SAP BTP cockpit. Once you've created a Cloud Foundry environment instance (a Cloud Foundry org), use the Cloud Foundry CLI (cf CLI).
## Prerequisites
- You have created a trial account.
- You have downloaded and extracted the following command-line tools:
- SAP BTP command-line interface (btp CLI). See Download and Start Using the btp CLI Client [page 2402]
- Cloud Foundry CLI (cf CLI). See Download and Install the Cloud Foundry Command Line Interface [page 2533]
## Procedure
 Tip
In the btp CLI, you can view the command help of each command to get information about how to use the command, its syntax, and input parameters. See Get Help [page 2415].
|   Step No. | Task                                                                                                                               | Per- formed By                               | Do This                                                                                                                                                                                                               | More Information                                                                                                                                                  |
|------------|------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|          1 | Log in to your global account us- ing the subdomain of your global account.                                                        | Global ac- count ad- ministra- tor or viewer | Run this command in the btp CLI: btp login                                                                                                                                                                            | See Log in [page 2416].                                                                                                                                           |
|          2 | View details of your global account.                                                                                               | Global ac- count ad- min or viewer           | Run this command in the btp CLI: btp get accounts/global- account                                                                                                                                                     | See Working with Global Accounts, Di- rectories, and Subac- counts Using the btp CLI [page 2434].                                                                 |
|          4 | View all the regions that are availa- ble to your global account and sub- accounts.                                                | Global ac- count ad- min or viewer           | Run this command in the btp CLI: btp list accounts/ available-region                                                                                                                                                  | This command also provides information about the environ- ments and infrastruc- ture provider of each region.                                                     |
|          5 | Create subaccounts in your global account.                                                                                         | Global ac- count ad- min                     | Run this command in the btp CLI: btp create accounts/ subaccount --display-name <my-subaccount> --region <my-region> --subdomain <my-subaccount-subdomain>                                                            | See Working with Global Accounts, Di- rectories, and Subac- counts Using the btp CLI [page 2434] and Account Model.                                               |
|          6 | View the details of the subaccounts in your global account.                                                                        | Global ac- count ad- min or viewer           | Run this command in the btp CLI: btp get accounts/ subaccount <ID of new subaccount>                                                                                                                                  | See Working with Global Accounts, Di- rectories, and Subac- counts Using the btp CLI [page 2434].                                                                 |
|          7 | Add admins to your subaccounts.                                                                                                    | Subac- count ad- min                         | Assign the role collection Subaccount Administrator to the user by running the following com- mand in the btp CLI: btp assign security/role- collection "Subaccount Administrator" --to-user <user> --create-user-if- | See Managing Users and Their Authori- zations Using the btp CLI [page 2445] and Security Admin- istration: Managing Authentication and Authorization [page 2278]. |
|          8 | View all the services and applica- tions that are entitled to your global account, including quota informa- tion per service plan. | Global ac- count ad- min or viewer           | Run this command in the btp CLI: btp list accounts/ entitlement                                                                                                                                                       | See Setting Entitle- ments Using the btp CLI [page 2438].                                                                                                         |
|   Step No. | Task                                                                       | Per- formed By                 | Do This                                                                                                                                                                                                                                  | More Information                                                                 |
|------------|----------------------------------------------------------------------------|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------|
|          9 | Assign quotas to your subaccounts.                                         | Global ac- count ad- min       | Run this command in the btp CLI: btp assign accounts/entitlement --to- subaccount <my-subaccount- id> --for-service <my- service> --plan <my- service-plan> --amount <number> Validate with this command: btp list accounts/ entitlement | See Setting Entitle- ments Using the btp CLI [page 2438].                        |
|         10 | View all the entitlements in your subaccounts.                             | Subac- count ad- min or viewer | Run this command in the btp CLI: btp list accounts/ entitlement --subaccount <my-subaccount-id>                                                                                                                                          | See Setting Entitle- ments Using the btp CLI [page 2438].                        |
|         11 | Create a Cloud Foundry org (envi- ronment instance) in your subac- counts. | Subac- count ad- min           | Run this command in the btp CLI: btp create accounts/ environment-instance -- subaccount <my-subaccount- id> --display-name <my- environment> --environment <cloudfoundry>                                                               | See Working with En- vironments Using the btp CLI [page 2439].                   |
|         12 | View details of the environment in- stances in your subaccounts.           | Subac- count ad- min or viewer | Run this command in the btp CLI: btp list accounts/ environment-instance -- subaccount <my-subaccount- id>                                                                                                                               | See Working with En- vironments Using the btp CLI [page 2439].                   |
|         13 | Create a Cloud Foundry space.                                              | Org man- ager                  | Run these cf CLI commands: cf login cf create-space                                                                                                                                                                                      | See Create Spaces Using the Cloud Foun- dry CommandLine In- terface [page 2572]. |
|   Step No. | Task                                                             | Per- formed By   | Do This                                                                                                            | More Information                                                                                                                                                               |
|------------|------------------------------------------------------------------|------------------|--------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|         14 | Add Cloud Foundry org and space members.                         | Org man- ager    | Run these cf CLI commands: cf set-org-role <USERNAME> <ORG> <ROLE> cf set-space-role <USERNAME><ORG><SPACE><ROL E> | See Add Organization Members Using the Cloud Foundry Com- mand Line Interface [page 2571] and Add Space Members Us- ing the Cloud Foundry CommandLine Inter- face [page 2573]. |
|         15 | Display all available services in the Cloud Foundry marketplace. | Org man- ager    | Run this cf CLI command: cf marketplace                                                                            | See Using Services in the Cloud Foundry Environment [page 252].                                                                                                                |
Using the btp CLI, you can perform account maintenance tasks, such as updating global account and subaccount details, deleting subaccounts, and deleting environment instances.
Subaccount members can also use the btp CLI to work with multitenant applications. See Working with Multitenant Applications Using the btp CLI [page 2440].
## Next Steps
Org/space members can create service instances, which are entitled to the subaccount, using also the cf create-service &lt;allowed-service-plan&gt; command in the cf CLI. Use the cf CLI command cf services to verify that the service instances exist.
For more information about developer tasks, see Development in the Cloud Foundry Environment [page 237].
## Related Information
Command Syntax of the btp CLI [page 2408]
Download and Start Using the btp CLI Client [page 2402] Commands in the btp CLI [page 2433]