As Civo grows, more regions for your instances will become available. You can run civo region ls to list the regions available. Block storage (Volumes) is region-specific, so if you configure an instance in one region, any volumes you wish to attach to that instance would have to be in the same region.

List all region

You can run civo region ls to get the list of all regions

civo region ls
+------+-------------+----------------+---------+
| Code | Name        | Country        | Current |
+------+-------------+----------------+---------+
| FRA1 | Frankfurt 1 | Germany        |         |
| LON1 | London 1    | United Kingdom | <=====  |
| NYC1 | New York 1  | United States  |         |
+------+-------------+----------------+---------+

Change region

To change the region the only cmd you need run is civo region current <REGION-CODE> and you will see a message like this

 civo region current NYC1

The default region was set to (New York 1) NYC1

Use region in non-interactive mode

To set the region in non-interactive mode, you only need pass to the command this --region <REGION-CODE> like this

civo kubernetes create production-01 -n 4 --wait --region NYC1

Enabling shell autocompletion

The civo binary is delivered with the support for bash, zsh, powershell and fish, and you can use in this way

civo completion [bash|zsh|powershell|fish]

Sourcing the completion script in your shell enables civo autocompletion.

However, the completion script depends on bash-completion, which means that you have to install this software first (you can test if you have bash-completion already installed by running type _init_completion).

Install bash-completion

bash-completion is provided by many package managers (see here). You can install it with apt-get install bash-completion or yum install bash-completion, etc.

The above commands create /usr/share/bash-completion/bash_completion, which is the main script of bash-completion. Depending on your package manager, you have to manually source this file in your ~/.bashrc file.

To find out, reload your shell and run type _init_completion. If the command succeeds, you're already set, otherwise add the following to your ~/.bashrc file:

source /usr/share/bash-completion/bash_completion

Reload your shell and verify that bash-completion is correctly installed by typing type _init_completion.

Enable civo autocompletion

You now need to ensure that the civo completion script gets sourced in all your shell sessions. There are two ways in which you can do this:

  • Source the completion script in your ~/.bashrc file:
echo 'source <(civo completion bash)' >>~/.bashrc
  • Add the completion script to the /etc/bash_completion.d directory:
civo completion bash >/etc/bash_completion.d/civo

If you have an alias for civo, you can extend shell completion to work with that alias:

echo 'alias c=civo' >>~/.bashrc
echo 'complete -F __start_civo c' >>~/.bashrc

Install zsh-completion

The civo completion script for Zsh can be generated with the command civo completion zsh. Sourcing the completion script in your shell enables civo autocompletion.

To do so in all your shell sessions, add the following to your ~/.zshrc file:

source <(civo completion zsh)

If you have an alias for civo, you can extend shell completion to work with that alias:

echo 'alias c=civo' >>~/.zshrc
echo 'complete -F __start_civo c' >>~/.zshrc

After reloading your shell, civo autocompletion should be working.

If you get an error like complete:13: command not found: compdef, then add the following to the beginning of your ~/.zshrc file:

autoload -Uz compinit
compinit

To set the civo completion code for zsh to auto-load on start up yo can run this command. bash civo completion zsh > "${fpath[1]}/_civo"