Configure BCE-CLI
Updated at:2025-10-16
Configure a CLI environment supporting Chinese display
If you need to configure a CLI environment that supports Chinese display, execute the following command:
$ export LANG=en_US.UTF-8
Note: You can first run the
$ localecommand to check the language support status of the current environment. If it is notLANG=en_US.UTF-8, you can execute the above command to modify it.
(Optional) Configure AK/SK information
Before using the BCE CLI tool, it's recommended to configure the Access Key and Secure Key. You can set AK/SK details using the -c/--configure option.
Plain Text
1$ bce -c [<conf-path>]
2
3$ BOS Access Key ID [None]: Enter Your AK
4
5$ BOS Secret Access Key [None]: Enter Your SK
6
7$ Default region name [bj]: Enter Your region
8
9$ Default domain [bj.bcebos.com]: Enter Your host
| Parameters | Description | Required or not |
|---|---|---|
<conf-path> |
Automatically write the configuration file to the specified directory. When users have multiple Baidu AI Cloud accounts, specify <conf-path> to write configuration files for different accounts to different directories.When <conf-path>{-3-} is not specified, the CLI automatically writes the configuration file to the current user's home directory~/.bceupon completion |
No |
| AK/SK | Baidu AI Cloud assigns each user a pair of AK/SK, which can be obtained by logging into the management console. Refer to [GetAKSK](Reference/Retrieve AK and SK/How to Obtain AKSK.md) | Yes |
| region | bj (North China-Beijing); gz (South China-Guangzhou); su (East China-Suzhou) | No |
| host | VPC service domain names: bcc.bj.baidubce.com (North China-Beijing); bcc.gz.baidubce.com (South China-Guangzhou); bcc.su.baidubce.com (East China-Suzhou) |
Yes |
