How to switch to a different model

To change from one model to another, use the switch command. Running the command with no arguments will return the currently active controller and model.

juju switch <controller>[:<model>]
Ways to change to a model:
juju switch foo If a controller with name ‘foo’ exists, then this selects the last used
model in that controller. Otherwise, i.e. if there is no controller called ‘foo’,
then the model with name ‘foo’ in the current controller is selected.
juju switch :foo Selects model ‘foo’ in the current controller.
juju switch foo:bar Selects model ‘bar’ in controller ‘foo’.
juju switch foo: Selects the last used model in controller ‘foo’.

Last updated 3 months ago.