At the command prompt, type importprivkey, leave a space and insert the key. Press <Enter> and the key will be imported. This may take some time to complete the process.
The address will be displayed in your addresses in the “Get coins” section and become part of your wallet.
If you encrypted your wallet, you will need to enter into the command –
walletpassphrase ‘your secret password’ ’30’ ‘.
To export the private key in your wallet, follow the same instructions, but instead of the importprivkey command, you need to use the dumpprivkey [your Bitcoin address here] command.