Guides - Install and Configure the Linode CLI
Access the entire Linode platform from the command line, easily adding, removing, or modifing services.
Install the Linode CLI
Open your preferred terminal application. For Windows, you can use either Powershell or the command prompt.
Ensure that Python 3 and
pip3are both installed. If not, follow the instructions within the Install Python 3 and pip3 section.
python3 --version pip3 --version
To install or upgrade the Linode CLI, run the following command:
pip3 install linode-cli --upgrade
Install the boto library if you intend to interact with Linode’s Object Storage service.
pip3 install boto
To confirm that the Linode CLI has been successfully installed, run the help command.
Configure the Linode CLI
The first time you interact with the Linode CLI, you need to complete the initial configuration steps discussed in this section.
Initiate the Linode CLI configuration process.
Web-based authentication: Prompts you to sign in to your Linode account through a web browser.
Manually create a personal access token: Prompts you for a token that you need to manually create. See Linode API Keys and Tokens.
linode-cli configure --token
After authenticating or providing a token, you are presented with a series of prompts to select your preferred defaults, such as the region, Compute Instance type, and distribution. These are optional and can be overridden when running individual commands. Update these defaults at any time by running
linode-cli configureagain or by editing the
To configure the CLI without any interactive prompts, you can set the token through the following environment variable, replacing [token] with the token you’ve manually generated. See Linode API Keys and Tokens.
This allows you to bypass the initial configuration. If this variable is unset, the Linode CLI will stop working until it is set again or until the CLI is reconfigured through the interactive prompts.
Install Python 3 and pip3
Python 3 can be installed on Windows through downloading the installer package directly from Python’s website.
Open a web browser and navigate to Python’s Downloads page. Download the latest stable Python 3 package for Windows.
Open the installer package that was just downloaded. This is likely a
Within the installer window, check “Add Python 3.x to PATH” and then select Customize installation.
Ensure that the
pipoption is checked and select Next.
Under Advanced Options, ensure that the following options are checked:
- Install for all users
- Associate files with Python
- Create shortcuts for installed applications
- Add Python to environment variables
- Precompiled standard library
Nextto proceed with the installation. Once the installation is complete, a message appears confirming that Python 3 was successfully installed.
Installing Python 3 on macOS can also be done by downloading the package directly from Python’s website. Advanced users can also install Python 3 through Homebrew or manage multiple Python 3 versions through pyenv.
Open a web browser and navigate to Python’s Downloads page. Download the latest stable Python 3 package for macOS.
Open the installer package that was just downloaded to begin the installation.
Follow the prompts to install Python3 and pip.
On most Linux distributions, you can use the distribution’s package manager to install both the
Ubuntu and Debian: Ubuntu 22.04, 20.04, 18.04, and 16.04 | Debian 11, 10, and 9
sudo apt update sudo apt install python3 && sudo apt install python3-pip
CentOS Stream, RHEL 8, and Fedora: CentOS Stream 9 (and 8), CentOS 8, other RHEL derivatives (including AlmaLinux 8, and Rocky Linux 8), and Fedora.
sudo dnf upgrade sudo dnf install python3 && sudo dnf install python3-pip
sudo yum update sudo yum install python3 && sudo yum install python3-pip
This page was originally published on