I Have entered into my geth console


["0xf844f0d7acb0d01bf66ffd81809fb96b2236abce", "0xc8d94cb87173fc94c4b165e44a5fc0b047618044", "0x6a0ef1a429c3570cb342963d309dd5aaa9e49cd4", "0x21c4910f85842cd6dc2ecb50fc2612b2b0c9e703"]

But i coudn't see my metamask account which metamask gave me first


Address of the metamask given account

I tried to request ether by fosset for test it gave me 3 ether but I can't see it in my console


MY metamask test network is having 3 ether so I tried to check the balance in terminal still it gave me 0

> eth.getBalance('0xC2a7b0DD8e7728C77712EB196fDcF375C3632fA8')

1)How to import the metamask account into geth so we can interact with geth console

2) Why balance is showing me zero when typing the command even if the balance is present

1 Answer 1


You can import your account into geth using this command geth account import <keyfile> , where keyfile is the associated private key.

Or you can directly copy the UTC file that lies in the keystore as explain here import-account-from-one-geth-node-to-another-geth-node

  • Thanks The following account is imported from metamask with private key i have changed my private key in the comment but i followed the same process But it failed > geth account import b770ae3db608ab903d1f2a0b4dec4dc5 (anonymous): Line 1:6 Unexpected identifier (and 1 more errors) Commented Oct 26, 2018 at 3:58
  • you need to run this command from you OS command line not from the geth javascript console
    – M. Riggi
    Commented Oct 26, 2018 at 12:41
  • i Tried it gave me geth account import b770ae3db608b357c250ca0f8cd5 Fatal: Failed to load the private key: open b770ae3db608ab Commented Oct 26, 2018 at 13:12
  • b770ae3db608b357c250ca0f8cd5 is not a file containing your private key. I think you should read this link [link] (github.com/ethereum/go-ethereum/wiki/Managing-your-accounts)
    – M. Riggi
    Commented Oct 26, 2018 at 13:56

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.