Geth Balance Transfer

jalthagejalthage Member Posts: 30
Can someone please provide a step by step guide to how to get my current ether balance from my geth wallet, to my new wallet? Super guide for dummies would be awesome.
I'm clearly no good at using the cmd prompt and I don't want to lose that ether.
Thank you!


  • erstwealerstweal MidwestMember Posts: 122 ✭✭
    By geth wallet I will assume that you mean the account created on your local computer made when you first did “geth account new”.

    This is all from an Ubuntu perspective, so if you’re using Windows, you’ll need to adjust a bit.

    A couple things to keep in mind:

    Your address is associated with a keystore that is on your machine. The keystore in combination with your password will allow you to unlock your account so that you can send transactions.

    From what I can tell, this whole deal works with units called wei instead of ether, which you might find surprising since we are ethmining. You will probably want to use ether as a unit since we can understand it more. There are functions to convert from wei to ether (web3.fromWei) and from ether to wei (web3.toWei) which I’ll use below.

    You need to be careful when you do cut and paste with anything that uses “ and ‘ because they don’t always come across the same way. For some reason, my computer likes to change them to different versions of apostrophes and such. Whenever I cut and paste, I go back and re-type the “ so that it comes out.

    You need to unlock your account before you can actually send anything out.

    I generally use geth attach to send ETH out, but there are other ways as well. You need to have geth running in another terminal window already.

    From Ubuntu prompt:~$ geth account list

    This tells you your accounts, presumably you have just one, but you can have several if you want.

    Below is a transfer I made:

    :~$ geth attach
    Welcome to the Geth JavaScript console!

    It will list a few lines of information, including your account number here. If your account number which is called coinbase. If that is what you expect, then you are all set.

    This will give you your balance (in units of ether)

    > web3.fromWei(eth.getBalance(eth.coinbase),"ether")


    First I try to send, but it says that the account is not unlocked.

    > eth.sendTransaction({from: eth.coinbase, to: "0x8F3e5B7c30BA103e4d1a78312B7c53eeAD726e01", value: web3.toWei(1.00, "ether")})
    Error: authentication needed: password or unlock
    at web3.js:3104:20
    at web3.js:6191:15
    at web3.js:5004:36
    at :1:1

    This command unlocks the account. It prompts for the password which you type in without seeing it. The true means that it accepted the password. If you fail, try it again, but be more careful.

    > personal.unlockAccount("e451e767bed70ba82dccaeaabc38d3258cce5b8f")

    Unlock account e451e767bed70ba82dccaeaabc38d3258cce5b8f

    This time the transfer will work and it gives you a long transaction number that you can track to see the transfer go through.

    > eth.sendTransaction({from: eth.coinbase, to: "0x8F3e5B7c30BA103e4d1a78312B7c53eeAD726e01", value: web3.toWei(1.00, "ether")})

    Feel free to message if you run into problems.
  • CodeCryptorCodeCryptor Member Posts: 11
    Well written reply @erstweal . I had my concerns about this same issue and you have answered them precisely in easy to understand terms. Good job mate.
  • SchließMuskelKaterSchließMuskelKater Member Posts: 12
    @erstweal Thanks a lot! Im also new here and earned my first 0.03 eth a view days ago and since that i did not manage it transfer the ether. I also startet width ubuntu and geth account new.
    I always tried geth console (but this doesnt work in a second ubuntu-console).

    Now i have one more question: When i unlock the account, how long will it be unlocked? Will ich be locked later automatically? And can somebody else access my account while it is unlocked?
  • jalthagejalthage Member Posts: 30
    @erstweal I thought I thanked you a while back, but if I didn't Thank You!!
    @SchließMuskelKater I had the same question about it being unlocked. What I did was opened a new wallet, in my case Exodus and transfered my entire balance to that wallet. Then I pointed my miner at the Exodus wallet and have stopped using my Geth wallet altogether.
    Good luck!
  • erstwealerstweal MidwestMember Posts: 122 ✭✭
    @SchließMuskelKater It stays unlocked until you lock it again. I believe if you close GETH it becomes locked again, but I don't remember for sure. It certainly is locked again if you re-start your machine. If someone gains access to your computer while it is unlocked they would be able to transfer ETH out of your account.
  • SchließMuskelKaterSchließMuskelKater Member Posts: 12
    @erstweal Is there a Console-Command to lock it manually?

    And another question that didn't figured out yet: I created with geth account new my first account on my mining-computer but i would like to manage this account also on my notebook. How do i exactly import it to geth on my notebook? (didn't understood it in this documentation )

    Thanks in advance!
  • erstwealerstweal MidwestMember Posts: 122 ✭✭
    @SchließMuskelKater The easiest way is to copy the keystore file that is on your mining computer to your notebook. On an Ubuntu machine it's in a hidden folder named .ethereum subdirectory keystore. I don't know where it is in Windows, but it should be easy enough to google. I don't know why they do all that import stuff, it's just a file.

    And to re-lock your account, simply exit out of Geth console and the account is locked again.
Sign In or Register to comment.