• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer

Mister PKI

SSL Certificates * SSL Tools * Certificate Decoder

  • Buy SSL Certificates
  • Blog
  • OpenSSL
  • Keytool
  • SSL Tools
  • Donate

How to Install Keytool

October 14, 2021 by Mister PKI Leave a Comment

The Java keytool is a command line utility provided with each installation of Java, and this article will guide you through the process of a keytool install in both WIndows and Linux. Keytool is used to manage keystore, symmetric asymmetric (public/private) keys, and certificates. Many applications and application servers use keystores in the form of the Java Keystore (jks) or PKCS12 keystore, which can be maintained by the Java keytool.

The following examples will demonstrate how to install keytool on windows and linux. To answer the general of question of how to install keytool, it’s only a matter of installing the version of java, which is shipped with the keytool command line utility.

Install Keytool Windows

This example will demonstrate how to install keytool on Windows, specifically on Windows 10. This example may be used on other versions of WIndows as well.

If your Windows machine already has Java installed, you are good to go. You may type the following keytool help command to learn how to begin using keytool on Windows.

keytool --help

If Java is not already installed, you will need to install the java version of your choice. In this example we will be installing the Amazon Corretto JDK for WIndows 7 or Later. It can be found here: https://docs.aws.amazon.com/corretto/latest/corretto-11-ug/downloads-list.html

After downloading the .msi file, click the file to start the installation wizard.

The installation Wizard will look like the following:

windows install amazon corretto java 11

Follow the wizard providing the default options to complete the installation of amazon corretto 11 JDK on Windows.

After Java is installed you will need to set the JAVA_HOME environment variable if not set by the installation process.

After verifying the JAVA_HOME environment variable was set, open a command prompt. To verify Java was installed, run the following command to check the version:

java -version

Then type keytool --help as described above to begin using keytool.

Install Keytool Linux

This example will demonstrate how to install keytool on linux, specifically on Ubuntu 20.04. This example may be used on most if not all versions of Ubuntu or any debian based linux operating system. The general principals also apply across all flavors of linux, with the primary difference being the package manager used for the installation of keytool.

If your linux machine already has Java installed, you are good to go. You may type the following keytool help command to learn how to begin using keytool on Linux.

keytool --help
keytool help

If Java is not already installed, you will need to install the java version of your choice. In this example we will be installing the Amazon Corretto JDK, specifically java-11-amazon-corretto-jdk. To install amazon corretto 11, run the following command:

sudo apt install java-11-amazon-corretto-jdk

After the command completes running, check that it was successfully installed by running the following command to check the java version:

java --version
check java version

After checking the version of java installed, go ahead with typing keytool --help as described above to verify that keytool is working with your java installation.

Conclusion

The article demonstrated how to install keytool on both the Windows and Linux platforms. If you would like to see more examples of how to install the Java keytool please let us know in the comments. Until then, visit all of our posts on how to use the java keytool for more examples.

keytool

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Popular Posts

PKCS12

openssl s_client

Keytool

Keytool list

ECDSA vs RSA

OpenSSL

PKCS7

Certificate Decoder

Training Courses

Top online courses in IT & Software

Cyber Security Training

Udemy - The Complete Internet Security Privacy Course icon

Buy SSL Certificates

The SSL Store

Comodo Store

Sectigo Store

RapidSSL

Recent Posts

  • pfx password
  • pkcs12
  • Sendmail vs Postfix – Mail Transfer Agent Comparison
  • Python mock datetime now
  • Python get SSL Certificate

Footer

  • Twitter
  • YouTube

Pages

  • About Mister PKI
  • Blog
  • Compare and Buy Affordable PKI Certificates
  • Contact Us
  • Full Disclosure
  • Privacy Policy
  • SSL Tools – Certificate Decoder and Certificate Checker

Copyright © 2022