All the information is from: https://www.youtube.com/watch?v=o90L6ksNW6g and https://www.youtube.com/watch?v=A5V2jdLi5mI
$ sudo apt install software-properties-common
$ sudo add-apt-repository -y ppa:ethereum/ethereum
$ sudo apt update
$ sudo apt install ethereum
$ geth version
$ sudo apt install nodejs
$ sudo apt install npm
$ sudo apt install curl
$ sudo apt install -y build-essential
$ node -v
$ npm - v
$ npm uninstall -g truffle
$ sudo npm install -g truffle
$ truffle version
$ wget -qO - https://packagecloud.io/AtomEditor/atom/gpgkey | sudo apt-key add -
$ sudo sh -c 'echo "deb [arch=amd64] https://packagecloud.io/AtomEditor/atom/any/ any main" > /etc/apt/sources.list.d/atom.list'
$ sudo apt update
$ sudo apt install atom
$ which atom
$ which apm
$ apm install language-ethereum
$ cd ~
$ mkdir ethereum
$ echo 'export ethereum_home=~/ethereum'>>~/.bash_profile
$ source ~/.bash_profile
$ cd ethereum
$ vi $ethereum_home/genesis.json
# paste this code with cmd v in edit mode
# Save with esc: !:wq
{
"nonce": "0x0000000000000042",
"timestamp": "0x0",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"extraData": "0x",
"gasLimit": "0x8000000",
"difficulty": "0x400",
"config": {},
"mixhash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"coinbase": "0x3333333333333333333333333333333333333333",
"alloc": {}
}
# change eth_node
$ geth --datadir "$ethereum_home/eth_node" init "$ethereum_home/genesis.json"
$ cd eth_node
$ geth --datadir . account new
# add password
# write account password
# Save with esc: !:wq
$ vi $ethereum_home/eth_node/password.sec
# Change port number
$ nohup geth --datadir "$ethereum_home/eth_node" --port 30303 --nodiscover --ipcpath "$ethereum_home/eth_node/geth.ipc" --networkid 314159 --mine --miner.threads 1 --unlock 0 --password "$ethereum_home/eth_node/password.sec" 2> "$ethereum_home/geth.log" &
# Type the command for your node
$ geth attach ipc:$ethereum_home/blocklychain/geth.ipc
or
$ geth attach ipc:$ethereum_home/cpvanda/geth.ipc
or
$ geth attach ipc:$ethereum_home/eth_node/geth.ipc
or
$ geth attach ipc:$ethereum_home/<YOUR NODE>/geth.ipc
$ admin
$ admin.peers