交互式
geth account new
WARN [09-01|15:32:23] No etherbase set and no accounts found as default
Your new account is locked with a password. Please give a password. Do not forget this password.
Passphrase:
Repeat passphrase:
Address: {3e89ac078203a77da5e4db73a7a3476d1dd68f84}
非交互式
touch ~/ethereum_password
chmod 600 ~/ethereum_password
echo "mypassword" > ~/ethereum_password
geth --password ~/ethereum_password account new
Address: {77b2ce4af020c35e0b974a7395fde540ced3ecea}
列出所有帐号
geth account list
Account #0: {3e89ac078203a77da5e4db73a7a3476d1dd68f84} keystore:///root/.ethereum/keystore/UTC--2017-09-01T07-32-36.069050081Z--3e89ac078203a77da5e4db73a7a3476d1dd68f84
Account #1: {77b2ce4af020c35e0b974a7395fde540ced3ecea} keystore:///root/.ethereum/keystore/UTC--2017-09-01T07-36-32.180611527Z--77b2ce4af020c35e0b974a7395fde540ced3ecea
使用geth控制台
geth console 2>> file_to_log_output
> eth.accounts
["0x3e89ac078203a77da5e4db73a7a3476d1dd68f84", "0x77b2ce4af020c35e0b974a7395fde540ced3ecea"]
>personal.newAccount()
Passphrase:
Repeat passphrase:
"0xe514cb2319ce36a69ada705dbf0eb4f8bd1eb9e9"
>eth.accounts
["0x3e89ac078203a77da5e4db73a7a3476d1dd68f84", "0x77b2ce4af020c35e0b974a7395fde540ced3ecea", "0xe514cb2319ce36a69ada705dbf0eb4f8bd1eb9e9"]
更新帐号
geth account update 3e89ac078203a77da5e4db73a7a3476d1dd68f84
Unlocking account 3e89ac078203a77da5e4db73a7a3476d1dd68f84 | Attempt 1/3
Passphrase:
INFO [09-01|16:14:12] Unlocked account address=0x3E89Ac078203A77Da5E4DB73a7a3476D1Dd68f84
Please give a new password. Do not forget this password.
Passphrase:
Repeat passphrase:
网友评论