1

when I use "geth --dev",I find it already exist a account.But I don't know the password.How can I unlock this account.

3

The account has a blank password.

$ geth --dev console
...
> personal.unlockAccount(eth.accounts[0], "");
true

You can unlock from the command line using a --password password.txt where the file has no contents.

The following commands I executed shows that the eth.accounts[0] is unlocked:

$ touch password.txt
$ geth --dev --password password.txt console
...
> eth.sendTransaction({from: eth.accounts[0], to: eth.accounts[0], value: web3.toWei(1, "ether")});
"0x3a2608729a9aa08745fb016c94025fe469bf7181fdbda76f960b8a562b733971"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.