Help on Using the Java Keytool Command

Q

How to get help on using the Java Keytool command? I have never used Keytool before.

✍: FYIcenter.com

A

If you are new to the Java Keytool, you should first read the documentation: keytool - Key and Certificate Management Tool.

Java Keytool is a command line tool. You need to run it from a command line window using this syntax:

keytool <command> <options>

Examples Keytool commands:

keytool -genkeypair
keytool -certreq -file MyCertificate.csr
keytool -importcert -alias Mine -file MyCertificate.cer
keytool -exportcert -alias Root -rfc -file RootCertificate.pem
keytool -list -keystore MyStore.jks

Keytool also supports the "-help" command to provide command usage help:

  • "keytool -help" - Returns a list of valid Keytool commands.
  • "keytool <command> -help" - Returns list of valid options for the specified command.

2012-07-19, 7775👍, 0💬