keytool -genkey -v -keystore <keystore_name> -alias <alias_name> keyalg RSA -keysize 4096 -validity 10000
You provide a path to the file you want to save into the keystore_name, and for the alias_name you put the actual key name for which I normally use the application name; So, you type the following:
keytool -genkey -v -keystore android.keystore -alias com.mastertechapps.awesomeapp -keyalg RSA -keysize 4096 -validity 10000
Then, you will see the following:
Enter keystore password: Re-enter new password: What is your first and last name? [Unknown]: Nathanael AndersonWhat is the name of your organizational unit? [Unknown]: Mobile ApplicationsWhat is the name of your organization? [Unknown]: Master TechnologyWhat is ...