How to view environment variables in a fly machine?

# assuming printenv is built into the deployed docker image
flyctl ssh console -a <app-name> -C "printenv"
flyctl ssh console -a <app-name> -C "printenv <var-name>"

# echo also works
flyctl ssh console -a <app-name> -C "echo $var"

(ref).

1 Like