Would you like to learn how to create a self-signed certificate using OpenSSL? In this tutorial, we are going to show you how to create a self-signed certificate on a computer running Linux.

• Ubuntu 18
• Ubuntu 19
• Ubuntu 20
• Ubuntu 22

Equipment list

Here you can find the list of equipment used to create this tutorial.

This link will also show the software list used to create this tutorial.

Tutorial Linux - Create a self-signed certificate

Install OpenSSL.

Copy to Clipboard

Create a self-signed certificate on Linux.

Copy to Clipboard

Enter a password to protect the private key.

Copy to Clipboard

Enter the certificate information.

Copy to Clipboard

Optionally, create a self-signed certificate without prompting for information.

Copy to Clipboard

View the content of the certificate.

Copy to Clipboard

Congratulations! You are able to create a self-signed certificate on Linux.

Tutorial OpenSSL - Self-signed certificate commands

Generate a self-signed certificate with multiple alternative names.

Copy to Clipboard

Export the private key without the password.

Copy to Clipboard

Export the certificate and private key as a PFX file.

Copy to Clipboard

Export the public certificate to the CRT format.

Copy to Clipboard

On Windows, use Powershell to import this certificate as a trusted root certification authority.

Copy to Clipboard

Congratulations! You are able to create a self-signed certificate on Linux.