# Openstack CLI

<code class="expression">space.vars.product\_acronym</code> Compute, Block Storage, Network and Identity Services all expose OpenStack APIs and as such you can use the [Openstack CLI](https://docs.openstack.org/python-openstackclient/latest/cli/command-list.html) to perform an even wider set of operations compared to what you can do using the <code class="expression">space.vars.product\_name</code> UI.

This guide provides steps to install and configure the [Openstack CLI](https://docs.openstack.org/python-openstackclient/latest/cli/command-list.html).

Alternatively, you can use the [PCD CLI - pcdctl](https://docs.platform9.com/private-cloud-director/2025.8/reference/pcdctl-command-line) which provides a convenient wrapper around all commands exposed by the OpenStack CLI for the relevant <code class="expression">space.vars.product\_name</code> services.

### Install OpenStack CLI

Run this command to install OpenStack CLI on your local machine.

{% tabs %}
{% tab title="Bash" %}

```bash
apt install python3-openstackclient -y
```

{% endtab %}
{% endtabs %}

### Authenticate OpenStack CLI

The <code class="expression">space.vars.product\_name</code> UI provides you with a `pcdctl RC` file that's configured specific to your <code class="expression">space.vars.product\_name</code> environment. You can use the same RC file with the OpenStack CLI.

1. Navigate to `Settings` menu option located on the top right corner in the <code class="expression">space.vars.product\_name</code> UI. Then click on `API Access`.
2. You will see `pcdctl RC` listed here.
3. Copy the contents to a new file named `openstackrc` and update `OS_PASSWORD` with your <code class="expression">space.vars.product\_name</code> account password.
4. Run `source openstackrc` to set the environment variables.

### Run OpenStack CLI

Now you are ready to run the OpenStack CLI. The following command will list all virtual machines in your current tenant.

{% tabs %}
{% tab title="Bash" %}

```bash
openstack server list
```

{% endtab %}
{% endtabs %}
