Accounts - cogeorg/teaching GitHub Wiki
Once the private node is created, it is time to create some accounts. Therefore, navigate to the private node directory
$ cd Ethereum/private
and use the following command
$ geth --datadir . account new
to create an account. The --datadir .
flag makes sure that you create the account for the private node and not on the main network. The command will prompt the following
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase:
Repeat Passphrase:
Address: {2dff1a0f45fcb8797da2122b5d3dca57f44411c3}
Make sure you don't forget the password.
You can run this command several times to create as many accounts as you need for your application. All of them will have a unique address. This will be different from the one given here as an example because they are randomly generated.
The private keys are stored in the keystore folder. If you list the content of this folder by typing
$ ls keystore/
UTC--2018-05-30T13-54-18.783163394Z--2dff1a0f45fcb8797da2122b5d3dca57f44411c3
or
$ geth --datadir . account list
INFO [05-30|15:58:09] Maximum peer count ETH=25 LES=0 total=25
Account #0: {2dff1a0f45fcb8797da2122b5d3dca57f44411c3} keystore:///home/user/Ethereum/private/keystore/UTC--2018-05-30T13-54-18.783163394Z--2dff1a0f45fcb8797da2122b5d3dca57f44411c3
Note that the first account #0 is the one that will receive all the mining rewards when mining is started. Create at least 2 to continue with the wiki.