Getting started with geth on Ethereum
This project is maintained by u1i
Tools and platforms are constantly evolving and documentation is easily outdated. This is how you get started with Ethereum / geth on Ubuntu as of January 2018.
sudo apt-get install software-properties-common
sudo add-apt-repository -y ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install ethereum
geth --rinkeby
geth --datadir=$HOME/.ethereum/rinkeby attach ipc:$HOME/.ethereum/rinkeby/geth.ipc console
Once the console is open, you should have meaningful output from these commands to find out if the syncing is running and/or completed yet:
net.listening
net.peerCount
eth.syncing
geth --datadir=$HOME/.ethereum/rinkeby account new
then in console type: eth.accounts
- take note of your account identifier
alternatively create the account in the console:
personal.newAccount("somepassword")
https://www.rinkeby.io/#faucet - takes seconds only!
eth.coinbase
eth.getBalance(eth.coinbase)
https://rinkeby.etherscan.io/address/0xecd2e6a46e3ddd19674581c0464df335fe474c3e
create a second account first
from = eth.accounts[0];
to = eth.accounts[1];
amount = 1
personal.unlockAccount(from, "mypassword", 300)
eth.sendTransaction({from: from, to: to, value: amount})
What’s next? Storing data - or ‘contracts’. This is where it gets tricky.
– Thanks to cryptogoth