# SAP BTP CLI: How to use on Ubuntu 20.04

The Cloud Management Tools Feature Set B provides the SAP BTP CLI (Command Line Interface) that allows you a convenient account management on the command line. [1] This blog post describes how you get the btp CLI running on Ubuntu 20.04 (Linux).

SAP says that you are not only able to use the btp CLI for account management tasks on the command line but also to automate these procedures, e.g.:

• Manage global accounts, directories, and sub-accounts
• Set entitlements
• Work with environments
• Work with multi-tenant applications
• Manage users and their authorisations

The difference between the btp CLI and the Cloud Foundry CLI (cf CLI) [2] is that you can execute all tasks on global account, directory, and sub account level on btp CLI. That means that the creation of a Cloud Foundry environment instance is the last step with the btp CLI. After that, you have to use the cf CLI for managing org members, spaces, quota and so on. [3]

## Get started with BTP CLI on Ubuntu

1. Download the the btp CLI client for Linux on https://tools.hana.ondemand.com/#cloud-cpcli [4]
2. Extract the tar.gz archive with the following terminal command:
# Replace <name.tar.gz> with the file name
tar -vxzf <name.tar.gz>

# -v: Displays Verbose Information
# -x: Extract the archive
# -z: zip, tells tar command that creates tar file using gzip
# -f: creates archive with given filename 
1. Create for example a bin folder in the home directory if this does not exist.
# Folder in home directory
mkdir ~/bin
1. Copy the extracted and executable btp file into the bin folder.
# Copy the btp file in the bin folder
cp ~/Downloads/linux-amd64/btp ~/bin/btp
1. Add ~/bin to the PATH variable so that btp is always available:
# ~/bin is added to PATH
export PATH="/home/$USER/bin:$PATH"

# With this command you can check whether the path has been added
echo \$PATH
# You should see something like this: "/home/<user>/bin:/home/<user>/.nvm/versions/node/v16.7.0/bin:[...]"
btp login