What is the correct process to unlock an account? I was able to do this successfully in the geth console(see this post for more details on what I've tried Why does account show 0 balance, after seemingly successful transaction in geth console?)

enter image description here

2 Answers 2


Well, there are a few ways to unlock an account

  1. While starting geth, you can use --unlock

Unlock an account (may be creation index) until this program exits (prompts for password). --unlock takes multiple params, it could be an index of your account like 0, 2, 3 or it can be an address 0x12a.. or this can be primary to unlock primary account.

  1. from the geth console

personal.unlockAccount(address, "password")

Unlock multiple accounts from the command line

  --unlock      Unlock an account (may be creation index) until this program exits (prompts for password)
  --password    Password file to use with options/subcommands needing a pass phrase

Command example

geth --unlock primary --password "/path/to/file" this will unlock your primary account if the password specified in "/path/to/file" is correct.


From How to unlock accounts programmatically after the node has started? :

> geth --exec "personal.unlockAccount(eth.accounts[0], 'password', 1000)" attach

You are probably using the RPC API interface, so will need to enable the personal API using

geth [your options] --rpcapi "eth,net,web3,admin" [more options]

But be careful with the RPC API and the unlocking of your wallet if you hold real ethers in your wallet. See How to reduce the chances of your Ethereum wallet getting hacked?.

  • for now, is running on a private testnet. No real ethers yet Commented Jun 3, 2016 at 2:19
  • @matthewalexander Did you figure this out?
    – godimedia
    Commented Dec 1, 2016 at 2:16
  • The accepted answer in this thread solved my problem I believe Commented Dec 5, 2016 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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