linode-cli
Manage Linode cloud services from the command line
TLDR
List all Linodes
View documentation for managing Linode accounts
View documentation for managing Linodes
View documentation for managing Linode Kubernetes Engine (LKE) clusters
View documentation for managing NodeBalancers
View documentation for managing Object Storage
View documentation for managing domains and DNS configuration
View documentation for managing Linode Volumes
SYNOPSIS
linode-cli [GLOBAL_OPTIONS] <SERVICE> <ACTION> [ACTION_OPTIONS] [ARGUMENTS]
Examples:
linode-cli linodes create --region us-east --image linode/ubuntu22.04 --root_pass "StrongPassword123" --type g6-standard-1
linode-cli domains view example.com
linode-cli account settings
PARAMETERS
--json
Outputs the command's result in raw JSON format, suitable for programmatic consumption or integration with other tools.
--text
Outputs the command's result in plain text format (default), often rendered as a table. This is ideal for human readability directly in the terminal.
--format <columns>
When using --text output, specifies a comma-separated list of columns to display. This allows users to customize the output table. Example: --format id,label,status,region.
--delimiter <char>
When using --text output, specifies the character used to separate columns. Defaults to a space. Useful for parsing text output with tools like awk or cut.
--suppress-headers
When using --text output, prevents the column headers from being displayed, resulting in a cleaner output for scripting.
--no-headers
An alias for --suppress-headers, providing an alternative, often more intuitive, flag.
--version
Displays the installed version of the linode-cli and exits, useful for verifying the client's version.
--help
Displays general help for the CLI, or specific help for a chosen SERVICE or ACTION (e.g., linode-cli linodes --help or linode-cli linodes create --help).
--debug
Enables verbose debug logging, printing detailed request and response information. This is extremely useful for troubleshooting API calls or CLI issues.
--config <path>
Specifies an alternate path to the configuration file, overriding the default location (typically ~/.config/linode-cli/config or ~/.linode-cli). This allows for multiple configurations or non-standard setups.
--token <token>
Provides a Linode API Personal Access Token directly as an argument, overriding any token stored in the configuration file. Useful for one-off commands, ephemeral environments, or scripting without persistent configuration.
DESCRIPTION
The linode-cli is the official command-line interface for interacting with the Linode API. It allows users to manage their entire Linode cloud infrastructure, including computing instances (Linodes), domains, block storage volumes, object storage buckets, nodebalancers, and more, directly from their terminal. Built with automation and scripting in mind, it supports various output formats like JSON and plain text, making it highly versatile for integration into scripts, CI/CD pipelines, and other automated workflows. With linode-cli, users can effortlessly create, modify, delete, and list all their Linode resources, providing a powerful and efficient way to control their cloud services without needing to access the graphical Cloud Manager.
CAVEATS
The linode-cli requires a Linode API Personal Access Token for authentication. This token grants significant access to your Linode resources and should be kept secure. Sharing or exposing it publicly can lead to unauthorized access and potential data loss or service disruption.
Be extremely cautious when executing destructive actions (e.g., delete, rm) as they are often irreversible and can lead to permanent data loss or critical service disruptions. Always double-check commands before execution, especially in production environments.
AUTHENTICATION
The linode-cli authenticates primarily using a Linode API Personal Access Token. This token can be generated from the Linode Cloud Manager under the 'API Tokens' section. Once generated, it's typically configured and stored in a local configuration file (by default, ~/.config/linode-cli/config or ~/.linode-cli) by running the linode-cli configure command. For non-persistent use cases, the token can also be supplied per command via the --token global option or set as an environment variable (LINODE_CLI_TOKEN).
CONFIGURATION
The CLI uses a configuration file to store essential settings, including API tokens, default regions, and preferred output formats. The linode-cli configure command provides an interactive wizard to set up and manage these parameters. Users can also define multiple named configuration profiles, allowing them to easily switch between different Linode accounts or API tokens.
SERVICE AND ACTION MODEL
The linode-cli operates on a consistent SERVICE ACTION model, which mirrors the structure of the Linode API. Users first specify the Linode service they wish to interact with (e.g., linodes, domains, volumes, object-storage, nodebalancers), followed by the specific action to perform on that service (e.g., list, create, delete, update, view). Each service and action has its own set of specific options and arguments, which can be discovered using the --help flag (e.g., linode-cli linodes create --help will show options for creating a Linode instance).
HISTORY
Developed and maintained by Linode (now part of Akamai Technologies), the linode-cli emerged as the official command-line interface to their cloud platform. It was created to provide a robust, programmatic, and convenient way for users and developers to automate and manage their cloud infrastructure directly from the terminal. Its development closely tracks the evolution of the Linode API, ensuring comprehensive coverage of Linode's growing suite of cloud services, complementing the graphical Linode Cloud Manager.