How to enable wallet encryption from the command line? Which command should I use to encrypt a previously unencrypted wallet from the command line?
The command is: bitcoin-cli encryptwallet mypassphrase. 

The list with all commands exposed through bitcoind's RPC API can be found here: https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_calls_list or can be fetched with the command: bitcoin-cli help. 

It's worth noting that the encryptwallet command will not show up in bitcoin-cli help's results once your wallet is encrypted, instead you will get three new commands: walletlock,
walletpassphrase and walletpassphrasechange.