How do I get my private key in the core

How do I get my private key in the core

at the top open the console and type walletpassphrase “password” (number of seconds to unlock) like this:
walletpassphrase password 1000
then type dumpprivatekey “address”

can also type help to see a list of console commands