Skip to content

Instantly share code, notes, and snippets.

@adityaiitb
Last active July 25, 2020 22:48
Show Gist options
  • Save adityaiitb/808c12d4d517d7e9d245db45cc2aa375 to your computer and use it in GitHub Desktop.
Save adityaiitb/808c12d4d517d7e9d245db45cc2aa375 to your computer and use it in GitHub Desktop.
Examples of the keytool command

To list the contents of a keystore file

keytool -list -keystore .keystore

To list the contents of a specific alias

keytool -list -keystore .keystore -alias foo

To generate a key

keytool -genkey -keystore <file> -alias <alias / app name> -validity 10000

To change the name of an alias

keytool -changealias -keystore <file> -alias <old_alias> -destalias <new_alias>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment