linode-cli-linodes
List Linode virtual servers
TLDR
List all Linodes
Create a new Linode
View details of a specific Linode
Update settings for a Linode
Delete a Linode
Perform a power management operation on a Linode
List available backups for a Linode
Restore a backup to a Linode
SYNOPSIS
The `linode-cli linodes` command typically follows the pattern:
`linode-cli linodes
Common subcommands include:
`linode-cli linodes ls [options]` - Lists Linode instances.
`linode-cli linodes create [options]` - Creates a new Linode instance.
`linode-cli linodes delete
`linode-cli linodes reboot
`linode-cli linodes shutdown
The `options` and `arguments` vary significantly depending on the chosen `subcommand`.
PARAMETERS
`--text`
Outputs results in a human-readable, plain-text table format.
`--json`
Outputs results in raw JSON format, suitable for scripting and programmatic parsing.
`--format
Specifies the columns to display and their order for text output (e.g., `--format id,label,region`).
`--no-headers`
Suppresses the column headers in text output.
`--delimiter
Sets the column delimiter for text output (default is two spaces).
`--suppress-warnings`
Suppresses warnings printed to stderr.
`--token
Specifies the Linode API token to use for the command. Overrides configured tokens.
`--config
Specifies the path to the configuration file (default is `~/.config/linode-cli`).
`--version`
Displays the `linode-cli` version and exits.
`--help`
Shows help message for the command or subcommand.
DESCRIPTION
The `linode-cli linodes` command is a powerful subgroup within the `linode-cli` suite, dedicated to managing Linode instances (virtual machines). It provides a comprehensive interface for performing a wide range of operations on your Linode compute instances directly from the command line. This includes listing existing Linodes, creating new ones, deleting, rebooting, shutting down, resizing, rebuilding, managing associated disks and IP addresses, and much more. It serves as the primary tool for programmatic or script-based interaction with your Linode virtual infrastructure, offering an alternative to the Linode Cloud Manager web interface.
CAVEATS
When using `linode-cli linodes`, be mindful of the following:
1. API Token and Permissions: A valid Linode API token with appropriate read/write permissions for Linode instances is required. Operations like creating or deleting instances require `read_write` access.
2. Cost Implications: Creating Linode instances incurs charges. Ensure you understand the pricing model for the chosen instance type, region, and any associated services (e.g., volumes, IP addresses).
3. Data Loss: Deleting a Linode instance is irreversible and results in permanent data loss for all disks attached to that instance. Always verify the instance ID before deletion.
4. Rate Limiting: The Linode API has rate limits. Excessive or rapid requests might result in temporary API blocks.
5. Asynchronous Operations: Some operations, like Linode creation, resizing, or migration, are asynchronous. The CLI might return immediately, but the operation might take time to complete on the Linode backend. You may need to check the instance status using `linode-cli linodes ls` or `linode-cli events`.
AUTHENTICATION
The `linode-cli` primarily authenticates using a personal access token (PAT) obtained from the Linode Cloud Manager. This token can be configured via `linode-cli configure` or passed directly with the `--token` flag for individual commands.
OUTPUT FORMATTING
Users can extensively customize the output format, especially for listing commands (`ls`), using `--format`, `--text`, `--json`, `--no-headers`, and `--delimiter` to suit scripting or reporting needs. This flexibility is crucial for integrating `linode-cli` output into automated workflows.
HISTORY
The `linode-cli` was developed by Linode (now Akamai Technologies) to provide a robust command-line interface for interacting with the Linode API. It has evolved significantly since its initial release, adding support for new Linode services and API versions. The `linodes` group within the CLI has always been a core component, reflecting the fundamental nature of Linode instances as the primary service offered by the platform. Its development focuses on ease of use, scriptability, and full coverage of the Linode API's instance management functionalities, enabling automation and integration into CI/CD pipelines.
SEE ALSO
linode-cli account(1), linode-cli domains(1), linode-cli images(1), linode-cli volumes(1), linode-cli nodebalancers(1), linode-cli object-storage(1)