You can have multiple identities installed on the same machine, using dfx. Here are some tips for creating, switching, and otherwise managing your identities.
- To create a new identity, you can run
dfx identity new <identity_name>
. For example, you can run this command to create a new identity name “new_identity”:
% dfx identity new new_identity
Creating identity: "new_identity".
Created identity: "new_identity".
- To switch identities, you can use
dfx identity use <identity_name>
:
% dfx identity use new_identity
Using identity: "new_identity".
- To see which principal is currently being used right now, enter in
dfx identity whoami
:
% dfx identity whoami
new_identity
- To obtain a list of all identities, use
dfx identity list
:
% dfx identity list
anonymous
default
new_identity *
Updated