Ethereum Tutorials - Herong's Tutorial Examples - Version 1.02, by Dr. Herong Yang
"geth" Commands for Ethereum Accounts
This section describes 'geth' commands to manage Ethereum accounts.
"geth" offers the following commands to help you manage Ethereum accounts as keystore files at the given directory:
"geth account list --keystore <directory-path>" List all Ethereum accounts from the given keystore directory. If "--keystore ..." is not specified, default it to ".\keystore" under the "geth" node data directory.
"geth account new --keystore <directory-path>" Create a new Ethereum account in the given keystore directory.
"geth account import <private-key-file> --keystore <directory-path>" Create a new Ethereum account with the given private key in the given keystore directory.
All Ethereum keystore files are password protected.
"geth" does not offer commands to export private key out of an Ethereum account.
If you really want to get the private key, you can import the keystore file to MetaMask wallet. You can then export the private key from MetaMask wallet.
Last update: 2018.
Table of Contents