How to install s3cmd on Linux on CREODIAS

In this article you will learn how to install s3cmd on Linux. s3cmd can be used, among other things, to:

  • download files from EODATA repositories as well as to

  • store files in object storage available on CREODIAS,

without mounting these resources as a file system.

What We Are Going To Cover

  • Installing s3cmd using apt

  • Uninstalling s3cmd

Prerequisites

No. 1 Account

You need a CREODIAS hosting account with access to the Horizon interface: https://horizon.cloudferro.com.

No. 2 A virtual machine or local computer

These instructions are for Ubuntu 22.04, either on a local computer or on a virtual machine hosted on CREODIAS cloud.

Other operating systems and environments are outside of scope of this article and might require adjusting of the instructions accordingly.

If you want to install s3cmd on a virtual machine hosted on CREODIAS cloud, follow one of these articles:

Object storage from CREODIAS is available both on a virtual machine hosted on CREODIAS cloud and on a local Linux computer.

The EODATA repository is available on virtual machines hosted on CREODIAS cloud.

Installing s3cmd using apt

Update the packages on your system:

sudo apt update && sudo apt -y upgrade

Note

When executing sudo, you might get a prompt for password. If that is the case, enter the local user account password and press Enter.

Install s3cmd:

sudo apt -y install s3cmd

After installation, you will be able to use s3cmd as command in terminal. You can execute the following command to check whether the installation was successful:

s3cmd --version

You should get the version of s3cmd installed on your computer, for example:

s3cmd version 2.2.0
../_images/install-s3cmd-linux-01_creodias.png

Uninstalling s3cmd using apt

If you installed s3cmd using apt, you remove it using the same package manager:

sudo apt -y remove s3cmd

To remove packages which were installed as dependencies of s3cmd and/or other packages that were later removed, you can execute

sudo apt autoremove

This might affect software not related to s3cmd found on your computer. Executing this command will show you exactly the packages which are to be removed, for example:

../_images/install-s3cmd-linux-02_creodias.png

You should get the following question:

Do you want to continue? [Y/n]

If you are willing to remove these packages, answer with Y and press Enter. If not, answer with n and press Enter.

What To Do Next

To use s3cmd on a virtual machine hosted on CREODIAS cloud to access the EODATA repository, follow this article: How to access EODATA using s3cmd on CREODIAS.

To access object storage containers from CREODIAS cloud on a virtual machine hosted on CREODIAS cloud or on a local Linux computer, follow this article: How to access object storage from CREODIAS using s3cmd