Install the Aptos CLI on Linux
Last updated
Last updated
For Linux, the easiest way to install the Aptos CLI tool is via Python script, although if that does not work, you can also install manually via downloading pre-compiled binaries. The pre-compiled binaries approach is not generally recommended as updating is very manual.
⚠️
Note: If you are using an ARM architecture, you will have to install using the steps here:
python3 --version
.If python3 is not installed, you can find installation instructions on .
Or use the equivalent wget
command:
⚠️
If you receive the error Couldn't find distutils or packaging. We cannot check the current version of the CLI. We will install the latest version.
you can fix it by running pip3 install packaging
then repeating this step.
The steps to add a folder to your PATH are shell dependent.
You can run echo $SHELL
to print the default shell for your machine, then google specific steps to add a folder to your PATH for that shell.
aptos help
You should see a list of commands you can run using the CLI.
In the future, this is a helpful resource to learn exactly how each command works.
If you would like to update the Aptos CLI to the latest version, you can run aptos update
.
It’ll have a name like: aptos-cli-<version>-Ubuntu-x86_64.zip
.
Make sure you choose the right zip file for your computer architecture.
You will likely have to dismiss warnings that this is a suspicious file when downloading.
~/aptos
an executable by running chmod +x ~/aptos
.~/aptos help
.You should see instructions for how to use all CLI commands. These can be helpful in the future when you are trying to understand how to use specific commands.
The steps to add a folder to your PATH are shell dependent.
You can run echo $SHELL
to print the default shell for your machine, then google specific steps to add a folder to your PATH for that shell.
When using the pre-compiled binaries method, you can update the Aptos CLI by deleting your existing installation, then following the installation steps again.