DigitalOcean
sudo snap install doctl # or download binary
doctl account get
doctl billing-history list
doctl compute droplet create -h
doctl compute region list
doctl compute size list
doctl compute d ls # abbr for: droplet list
doctl compute d ls --format ID,Name,Region,Status,PublicIPv4
doctl compute d d algo # abbr for: droplet delete <droplet-name>
doctl compute da -h
Linode
Ref: Using the Linode CLI
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -U linode-cli
alias lincli='linode-cli'
lincli regions list # list all available regions and abbrs.
lincli images list
lincli linodes types
lincli configure # input personal access token and other choices, saved in ~/.linode-cli
lincli account view # list user information
lincli account settings
lincli account payments-list
lincli account invoices-list
lincli users list # list all Linode users
lincli events list
lincli linodes list
lincli linodes list --all
lincli linodes list --format 'id,label,ipv4,ipv6'
lincli linodes list --all --text --delimiter ',' | csvlook | less -S
lincli linodes list --json --pretty
lincli linodes view 18xxx65
lincli linodes ips-list 18xxx65 --json --pretty
lincli linodes create --label myvps --authorized_keys "$(cat ~/.ssh/id_rsa.pub)"
lincli linodes create --label myvps --authorized_users myLinodeUsername
# get user name with `lincli users list`, all ssh keys of this user will be added into root authorized_keys file
lincli linodes create --root_pass mypassword
lincli linodes delete 18xxx65