使用geth的account命令管理账户,例如创建新账户、更新账户密码、查询账户等:

geth account <command> [options...] [arguments...]
 

命令 - command

  1.  
    list 列表显示现有账户
  2.  
    new 创建一个新的账户
  3.  
    update 修改账户
  4.  
    import 导入私钥创建新账户

可以使用--help获取这些命令的帮助信息,例如:

  1.  
    ~$ geth account list --help
  2.  
    list [command options] [arguments...]
  3.  
     
  4.  
    Print a short summary of all accounts
  5.  
     
  6.  
    OPTIONS:
  7.  
    --datadir "/home/bas/.ethereum" Data directory for the databases and keystore
  8.  
    --keystore Directory for the keystore (default = inside the datadir)

创建新账户

使用geth account new命令新建账户:

  1.  
    $ geth account new
  2.  
    Your new account is locked with a password. Please give a password. Do not forget this password.
  3.  
    Passphrase:
  4.  
    Repeat Passphrase:
  5.  
    Address: {168bc315a2ee09042d83d7c5811b533620531f67}

导入私钥创建新账户

可以使用geth account import命令,通过导入私钥来创建一个新账户,

  1.  
    ~$ geth account import --datadir /someOtherEthDataDir ./key.prv
  2.  
    The new account will be encrypted with a passphrase.
  3.  
    Please enter a passphrase now.
  4.  
    Passphrase:
  5.  
    Repeat Passphrase:
  6.  
    Address: {7f444580bfef4b9bc7e14eb7fb2a029336b07c9d}

更新账户密码

使用geth account update命令来更新指定账户的密码:

  1.  
    ~$ geth account update a94f5374fce5edbc8e2a8697c15331677e6ebf0b
  2.  
    Unlocking account a94f5374fce5edbc8e2a8697c15331677e6ebf0b | Attempt 1/3
  3.  
    Passphrase:
  4.  
    0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b
  5.  
    Account 'a94f5374fce5edbc8e2a8697c15331677e6ebf0b' unlocked.
  6.  
    Please give a new password. Do not forget this password.
  7.  
    Passphrase:
  8.  
    Repeat Passphrase:
  9.  
    0xa94f5374fce5edbc8e2a8697c15331677e6ebf0b

显示已有账户

使用geth account list命令列表显示已有账户,可选的可以使用--keystore指定keystore目录:

  1.  
    ~$ geth account list --keystore /tmp/mykeystore/
  2.  
    Account #0: {5afdd78bdacb56ab1dad28741ea2a0e47fe41331} keystore:///tmp/mykeystore/UTC--2017-04-28T08-46-27.437847599Z--5afdd78bdacb56ab1dad28741ea2a0e47fe41331
  3.  
    Account #1: {9acb9ff906641a434803efb474c96a837756287f} keystore:///tmp/mykeystore/UTC--2017-04-28T08-46-52.180688336Z--9acb9ff906641a434803efb474c96a837756287f

geth 新建账户的更多相关文章

  1. 【SAP HANA】新建账户和数据库(2)

    开启HANA Studio,进入到User和Role的目录,这两个地方是创建账号和权限的. 新建用户 输入用户名和密码即可. 注意,如果系统里有同名的Catalog(数据库)存在的话,会报错,因为默认 ...

  2. win7文件夹共享(不新建账户、不带密码直接访问)

    1.右键需要共享的文件夹>共享>特定用户>选择Everyone>“添加”>“共享” 2.打开控制面板>按类别的查看方式>网络和Internet下的选择家庭组和 ...

  3. 修改linux新建账户时的过期时间

    #!/bin/bash cat << EOF >> /etc/login.defs PASS_MAX_DAYS 90 EOF

  4. geth常用指令

    ubuntu下载: https://github.com/ethereum/go-ethereum/wiki/Installation-Instructions-for-Ubuntu sudo apt ...

  5. 通过Geth搭建私有以太坊网络

    前言 为了进一步了解以太坊区块链网络的工作方式和运行原理,笔者通过官方软件Geth搭建了私有以太坊网络fantasynetwork,最终实现了单机和多机节点间的相互连通:首先通过VMware Work ...

  6. mac电脑忘记账户名密码解决方法

    1,重启电脑 ,开机按command+R 2,等苹果开机完成后会进入单用户模式.然后从单用户模式进入终端. 3,在终端里面输入resetpassword. 4,选择系统(root)账户重新输入密码,存 ...

  7. Outlook账户迁移帮助

    Outlook账户迁移指南 1. 介绍 开贴聊聊如何迁移Outlook用户账户到另外一台电脑. 相信许多Outlook用户都遇到过这样的情况:买来一台新电脑,安装完Outlook后,想把旧电脑里面的O ...

  8. leanote使用本地账户+坚果云同步

    1. 换机器后笔记无法显示 这是因为新建账户与原账户userid不一致. 正确的同步方式为: 下载leanote并解压,不运行,不新建账户 从坚果云同步leanote数据 创建leanote的数据目录 ...

  9. (2.2)学习笔记之mysql基础操作(登录及账户权限设置)

    本系列学习笔记主要讲如下几个方面: 本文笔记[三:mysql登录][四:账户权限设置][五:mysql数据库安全配置] 三.mysql登录 常用登录方式如下: 四.账户权限设置 (4.1)查看用户表, ...

随机推荐

  1. Reeds-Shepp曲线和Dubins曲线

    转载:https://www.cnblogs.com/huyanan/articles/6243694.html 什么是Reeds-Shepp曲线?       想象你下班开车回家,到了小区后想把车停 ...

  2. PHP基础——语法篇

    <!-- 语句:通过 PHP,有两种在浏览器输出文本的基础指令:echo 和 print. --> <?php echo "Hello World!"; //PH ...

  3. django_redis

    目录 下载 说明 补充: 内存中设置值 取值 使用 配置: settings/dev.py缓存配置 - redis存储:依赖 django-redis,要安装>>>pip insta ...

  4. Image Processing and Analysis_15_Image Registration: A Method for Registration of 3-D shapes——1992

    此主要讨论图像处理与分析.虽然计算机视觉部分的有些内容比如特 征提取等也可以归结到图像分析中来,但鉴于它们与计算机视觉的紧密联系,以 及它们的出处,没有把它们纳入到图像处理与分析中来.同样,这里面也有 ...

  5. Win7升级Win10系统提示错误0x80070057的解决方法

    Win7系统用户在通过Windows Update来升级Win10系统时,有时会出现0x80070057的错误代码从而导致无法继续升级.下面好系统重装助手就来告诉大家Win7升级Win10系统出现0x ...

  6. chkconfig 系统服务管理

    chkconfig --list   显示当前运行的所有服务/etc/inittabnetstat -antl   all n端口 t tcp协议 l listen状态chkconfig --add ...

  7. Nginx中ngx_http_upstream_module模块

    用于将多个服务器器定义成服务器器组,⽽而由 proxy_pass , fastcgi_pass 等指令进⾏行行引⽤用upstream backend {server backend1.example. ...

  8. DataSet,DataTable,DataView、DataRelation

    一.创建Dataset和DataTable DataSet ds = new DataSet();//DataSetName默认为"NewDataSet" DataTable ta ...

  9. JAVA实现WEBSERVICE 上传下载

    因公司新项目决定使用webservice与其它项目做交互,于是开始了webservice之旅.    初入webservice的时候第一个接触的工具叫axis2,网上有着大量的简单案例.功能很强大,代 ...

  10. python函数的作用域和引用范围

    以下内容参考自runoob网站,以总结python函数知识点,巩固基础知识,特此鸣谢! 原文地址:http://www.runoob.com/python3/python3-function.html ...