How do I manage multiple accounts with the Linode CLI?
Linode
Linode Staff
I have multiple accounts that I'd like to use with the Linode CLI. How can I set that up?
1 Reply
tommydavidson
Linode Staff
You can add multiple access tokens to the Linode CLI using linode-cli configure
to set up each user. Just be sure to choose the correct option when asked if you'd like to set the current user as the default. You can then switch users on a per-command basis using the --as-user
flag. For instance, you can list the Linodes which the user exampleuser
has access to with a command like the following:
linode-cli --as-user exampleusername linodes list
You can also list configured users with the show-users
command:
linode-cli show-users
Change users using the 'set-user' command:
linode-cli set-user secondexampleuser
And remove users with the remove-user
command:
linode-cli remove-user thirdexampleuser