- Create an account using the account command in the geth command-line tool. This will create an Ethereum account for you and will return the EOA address:
$ geth account new
If you are using the JavaScript console or Web3JS, use the following command to create an account:
> web3.personal.newAccount("<password>")
- Before you do any transaction from this account, unlock it using the password. Use the third parameter to control the duration of unlocking. To lock the account after the transaction, use the lockAccount function:
> personal.unlockAccount("<address>", "<password>")> personal.lockAccount("<your_address>")
- Creating an account using this method also creates an encrypted KeyFile. The file is located in your key store ...