How to create FreeNAS Jails with iocage

Originally published at: https://www.cyberciti.biz/faq/how-to-create-freenas-jails-with-iocage/

How do I install and use a FreeBSD jail manage called iocage on FreeNAS server from the command line? How do I create FreeNAS jail with iocage command?