docs/02_cleos/02_how-to-guides/how-to-create-key-pairs.md
Create a keypair consisting of a public and a private key for signing transactions in the EOSIO blockchain.
Before you follow the steps to create a new key pair, make sure the following items are fulfilled:
cleos[[info | Note]] | The cleos tool is bundled with the EOSIO software. Installing EOSIO will also install the cleos tool.
To create a keypair and print the result to the console:
cleos create key --to-console
Example Output
cleos create key --to-console
Private key: 5KPzrqNMJdr6AX6abKg*******************************cH
Public key: EOS4wSiQ2jbYGrqiiKCm8oWR88NYoqnmK4nNL1RCtSQeSFkGtqsNc
To create a keypair and save it to a file:
cleos create key --file FILE_TO_SAVEKEY
Where: FILE_TO_SAVEKEY = name of the file
Example Output
cleos create key --file pw.txt
saving keys to pw.txt
To view the saved keypair in the file:
cat pw.txt
Private key: 5K7************************************************
Public key: EOS71k3WdpLDeqeyqVRAAxwpz6TqXwDo9Brik5dQhdvvpeTKdNT59