Building Blockchain Projects
上QQ阅读APP看书,第一时间看更新

Creating accounts

Geth also lets us create accounts, that is, generate keys and addresses associated with them. To create an account, use the following command:

    geth account new

When you run this command, you will be asked to enter a password to encrypt your account. If you forget your password, there is no way to access your account.

To get a list of all accounts in your local Wallet, use the following command:

    geth account list

The preceding command will print a list of all the addresses of the accounts. Keys are, by default, stored in the --datadir path, but you can use the --keystore option to specify a different directory.