How to install s3cmd on Linux

In this article you will learn how to install s3cmd on Linux. s3cmd can be used, among other things, to store files in object storage available on Destination Earth, 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 Destination Earth hosting account with access to the Horizon interface: https://cloud.central.data.destination-earth.eu.

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 Destination Earth 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 Destination Earth cloud, follow one of these articles:

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

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_creodias1.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_creodias1.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.