All Products
Search
Document Center

Object Storage Service:Install ossutil

Last Updated:Nov 16, 2023

ossutil supports the following OSs: Windows, Linux, and macOS. You need to download and install an ossutil version that suits your OS.

Versions

  • Latest version: 1.7.18

  • Earlier versions: For more information about the source code and release notes of ossutil versions, visit GitHub.

Download links

Download and install ossutil

Linux

  1. Install ossutil.

    sudo -v ; curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bash
    Note
    • You must have a decompression tool, such as unzip or 7z, to decompress the installation package of ossutil for installation.

    • After the installation is complete, ossutil is installed in the /usr/bin/ directory.

  2. Configure ossutil.

    1. Run the following command to configure ossutil:

      ossutil config
    2. Configure the path of the configuration file.

      Specify the name of the configuration file. The name of the configuration file can contain the file path. The default name of the configuration file is /home/user/.ossutilconfig. If you press the Enter key without specifying a path, the default path is used. 
      If you want to store the file in another path, set the --config-file option to the path.

      By default, ossutil saves the configuration file as /home/user/.ossutilconfig. If you specify the path of the configuration file, add the -c option to specify the configuration file each time you run a command in ossutil. For example, if you save the configuration file as /home/config, add the -c option in the following format when you run the ls command:

      ossutil ls oss://examplebucket -c /home/config
    3. Follow the on-screen instructions to specify the display language of ossutil. Enter CH or EN. By default, ossutil is displayed in the language that is used by the OS. The configuration takes effect after you run the config command.

    4. Follow the on-screen instructions to specify the following parameters: Endpoint, AccessKey ID, AccessKey Secret, and STSToken. For more information about the parameters, see Run the config command to quickly configure ossutil.

  3. Run the following command to check whether ossutil is installed:

    ossutil

    If all commands that are supported by ossutil are displayed, ossutil is installed.

Windows

  1. Install ossutil.

    1. Click the download URL to download the installation package for Windows.

    2. Decompress the installation package. Then, run the ossutil.bat file.

  2. Configure ossutil.

    1. Run the following command to configure ossutil:

      ossutil config
    2. Configure the path of the configuration file.

      Specify the name of the configuration file. The name of the configuration file can contain the file path. The default name of the configuration file is C:\\Users\user\.ossutilconfig. If you press the Enter key without specifying a path, the default path is used. 
      If you want to store the file in another path, set the --config-file option to the path.

      By default, ossutil saves the configuration file as C:\\Users\user\.ossutilconfig. If you specify the path of the configuration file, add the -c option to specify the configuration file each time you run a command in ossutil. For example, if you save the configuration file as c:\ossutil\config, add the -c option in the following format when you run the ls command:

      ossutil ls oss://examplebucket -c c:\ossutil\config
    3. Follow the on-screen instructions to specify the display language of ossutil. Enter CH or EN. By default, ossutil is displayed in the language that is used by the OS. The configuration takes effect after you run the config command.

    4. Follow the on-screen instructions to specify the following parameters: Endpoint, AccessKey ID, AccessKey Secret, and STSToken. For more information about the parameters, see Run the config command to quickly configure ossutil.

  3. Run the following command to check whether ossutil is installed:

    ossutil

    If all commands that are supported by ossutil are displayed, ossutil is installed.

macOS

  1. Install ossutil.

    sudo -v ; curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bash
    Note

    By default, ossutil is installed in the /usr/local/bin directory.

  2. Configure ossutil.

    1. Run the following command to configure ossutil:

      ossutil config
    2. Configure the path of the configuration file.

      Specify the name of the configuration file. The name of the configuration file can contain the file path. The default name of the configuration file is /Users/user/.ossutilconfig. If you press the Enter key without specifying a path, the default path is used. 
      If you want to store the file in another path, set the --config-file option to the path.

      By default, ossutil saves the configuration file as /Users/user/.ossutilconfig. If you specify the path of the configuration file, add the -c option to specify the configuration file each time you run a command in ossutil. For example, if you save the configuration file as /home/config, add the -c option in the following format when you run the ls command:

      ossutil ls oss://examplebucket -c /home/config
    3. Follow the on-screen instructions to specify the display language of ossutil. Enter CH or EN. By default, ossutil is displayed in the language that is used by the OS. The configuration takes effect after you run the config command.

    4. Follow the on-screen instructions to specify the following parameters: Endpoint, AccessKey ID, AccessKey Secret, and STSToken. For more information about the parameters, see Run the config command to quickly configure ossutil.

  3. Run the following command to check whether ossutil is installed:

    ossutil

    If all commands that are supported by ossutil are displayed, ossutil is installed.