48.1 Ubuntu Linode CLI

20220923

The linode CLI is nice and simple to use to manage your resources.

pipx install linode-cli
linode-cli

This will use a browser to log in and then set some (optional) defaults:

Welcome to the Linode CLI.  This will walk you through some initial setup.

The CLI will use its web-based authentication to log you in.  
If you prefer to supply a Personal Access Token, use `linode-cli configure --token`. 

Press enter to continue.  This will open a browser and proceed with authentication.

A browser should open directing you to this URL to authenticate:

...

Configuring account

Default Region for operations.  Choices are:
 1 - ap-west
 2 - ca-central
 3 - ap-southeast
 4 - us-central
 5 - us-west
 6 - us-southeast
 7 - us-east
 8 - eu-west
 9 - ap-south
 10 - eu-central
 11 - ap-northeast

Default Region (Optional): 3

Default Type of Linode to deploy.  Choices are:

...

Config written to /home/kt/.config/linode-cli

...

To reconfigure, call `linode-cli configure`

For comprehensive documentation, visit https://www.linode.com/docs/api/

Notice that the defaults are saved into ~/.config/linode-cli and can be edited in there if needed, or else overridden on the command line.

linode-cli linodes list
┌──────────┬───────┬──────────────┬───────────────┬────────────────────┬─────────┬─────────────────┐
│ id       │ label │ region       │ type          │ image              │ status  │ ipv4            │
├──────────┼───────┼──────────────┼───────────────┼────────────────────┼─────────┼─────────────────┤
│ 12345678 │ myvm  │ ap-southeast │ g6-standard-2 │ linode/ubuntu22.04 │ offline │ 170.178.104.101 │
└──────────┴───────┴──────────────┴───────────────┴────────────────────┴─────────┴─────────────────┘


Your donation will support ongoing availability and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0