How can I obtain the current principal?

Most of the time, you will interact with principals during the development of Internet Computer blockchain dapps. On your development machine, you can get the current principal by typing the following dfx command into the console:

% dfx identity get-principal
*principal will appear here*


Please note, principals are created when you deploy canister smart contracts. So for the dfx command to work, you'd have to have previously deployed some canisters.

Updated