You can manage multiple identities using dfx with the following commands:
-
Create a new identity: dfx identity new <identity_name>
-
Switch between identities: dfx identity use <identity_name>
-
Check which identity is currently active: dfx identity whoami
-
List all available identities: dfx identity list
The dfx identity list
command will show all identities, with an asterisk (*) next to the currently active one.
These commands allow you to create, switch between, and manage multiple identities on your machine. Each identity has its own principal and can be used for different purposes when interacting with the Internet Computer.
Internet Computer Basics Part 1: Principals and Identities provides more details on managing multiple identities using dfx.
Updated