Command and option notes

The various commands and their options are listed and described in the following section. Note:
  • All command and option names are preceded by a minus sign (-).
  • The options for each command may be provided in any order.
  • All items not italicized or in braces or brackets are required to appear as is.
  • Braces surrounding an option generally signify that a default value will be used if the option is not specified on the command line. Braces are also used around the -v, -rfc, and -J options, which only have meaning if they appear on the command line (that is, they don't have any "default" values other than not existing).
  • Brackets surrounding an option signify that the user is prompted for the values if the option is not specified on the command line. (For a -keypass option, if you do not specify the option on the command line, keytool will first attempt to use the keystore password to recover the private/secret key, and if this fails, will then prompt you for the private/secret key password.)
  • Items in italics (option values) represent the actual values that must be supplied. For example, here is the format of the -printcert command:
    keytool -printcert {-file cert_file} {-v}
    When specifying a -printcert command, replace cert_file with the actual file name, as in:
    keytool -printcert -file VScert.cer
  • Option values must be quoted if they contain a blank (space).
  • The -help command is the default. Thus, the command line
    keytool
    is equivalent to
    keytool -help