Category

Linux Tutorials and Command Line Guides - Page 12

Learn Linux with step-by-step tutorials, command line examples, and system administration guides for Ubuntu, RHEL, CentOS, and more.

Welcome to the Linux tutorials section, your complete resource for mastering Linux commands and system administration.

This category covers everything from basic commands to advanced system-level operations across multiple distributions such as Ubuntu, RHEL, and CentOS.

Linux is the backbone of modern infrastructure, and understanding it is essential for DevOps, cloud computing, and system administration. You may also explore System Administration and Security for advanced topics.

Browse by distribution using the cards below — RHEL family (RHEL, Rocky Linux, AlmaLinux, CentOS, Fedora) and individual APT-based hubs (Ubuntu, Debian, Kali Linux, Linux Mint) — then see featured articles and the full article list.

639 articles

Linux category illustration with terminal, commands, permissions, and troubleshooting features

All Linux articles

security

Fix Java No Subject Alternative Names Present with keytool

Fix Java No subject alternative names present by adding DNS and IP SAN entries with keytool -ext SAN so the certificate matches the hostname or IP clients use.

Deepak Prasad11 min read
security

Fix keytool Failed to establish chain from reply

Fix keytool Failed to establish chain from reply by importing missing intermediate and root CA certificates before the server reply, using the correct keystore alias, or importing a complete PKCS7 chain bundle.

Deepak Prasad12 min read
security

Fix keytool Certificate not imported, alias already exists

Fix keytool Certificate not imported, alias already exists by listing aliases, deleting or renaming the old entry, and re-importing to the correct keystore with a unique alias.

Deepak Prasad8 min read
security

Fix keytool Error: Input not an X.509 certificate

Fix keytool Input not an X.509 certificate by importing valid PEM, DER, or supported certificate-chain input instead of HTML, private keys, PFX files, or malformed PEM.

Deepak Prasad10 min read
security

Fix java.security.UnrecoverableKeyException: Cannot recover key

Fix java.security.UnrecoverableKeyException: Cannot recover key by aligning keystore and private key passwords in Tomcat, Spring Boot, and KeyManagerFactory.

Deepak Prasad8 min read
security

Fix Java keytool Keystore Was Tampered With or Password Was Incorrect

Fix keytool Keystore was tampered with, or password was incorrect by checking storepass, file path, JKS vs PKCS12, cacerts, import passwords, and corruption.

Deepak Prasad11 min read
security

Configure Spring Boot HTTPS with keytool Keystore and Truststore

Enable Spring Boot HTTPS on port 8443 with a PKCS12 keystore from keytool, set server.ssl.key-store in application.properties, add an optional truststore for private CAs, and verify with Java HttpClient.

Deepak Prasad9 min read
security

Configure Tomcat SSL Certificate with keytool Keystore

Enable Tomcat 10 HTTPS on port 8443 with a PKCS12 keystore from keytool: import the CA chain before the server certificate, set certificateKeystoreFile in server.xml, and verify the TLS handshake.

Deepak Prasad8 min read
security

Fix Java PKIX Path Building Failed Using keytool Truststore

Fix javax.net.ssl.SSLHandshakeException PKIX path building failed by importing your private CA chain into a PKCS12 truststore with keytool, then point the JVM at it with javax.net.ssl.trustStore — without editing …

Deepak Prasad11 min read
security

Create a CSR with keytool and Import a CA-Signed Certificate

Generate a private key with keytool -genkeypair, build a CSR with -certreq, sign it with a local OpenSSL CA, and replace the self-signed entry using -importcert on the same alias.

Deepak Prasad9 min read
security

Fix keytool Public Keys in Reply and Keystore Don't Match

Fix keytool error Public keys in reply and keystore do not match by importing the signed certificate into the same alias that generated the CSR. Verify public-key hashes and distinguish this error from missing CA chain …

Deepak Prasad7 min read
security

Generate a Self-Signed Certificate with keytool for localhost and IP SAN

Generate a PKCS12 keystore with keytool -genkeypair, add DNS and IP Subject Alternative Names for localhost and 127.0.0.1, verify with keytool -list -v, and see why CN alone fails modern HTTPS hostname checks.

Deepak Prasad8 min read
security

Import Certificate into Java cacerts on Ubuntu, Debian, RHEL, Rocky Linux

Import a CA or TLS certificate into Java cacerts on Ubuntu, Debian, RHEL, and Rocky Linux with keytool -importcert: locate cacerts, use a copy for safe testing, default password changeit, and distro-specific system trust …

Deepak Prasad8 min read
security

Import Root, Intermediate, and Server Certificate Chain with keytool

Import a TLS chain into a Java PKCS12 keystore with keytool: root CA and intermediate as trustedCertEntry, server reply on the PrivateKeyEntry alias, correct order, -trustcacerts, and chain verification with keytool …

Deepak Prasad8 min read
security

keytool vs OpenSSL: Which Tool to Use for Certificates and Keystores

Compare keytool and OpenSSL for CSR generation, remote certificate inspection with openssl s_client, PEM key handling, PKCS12 creation, Java keystore import, and TLS chain debugging — with a task-by-task table so you …

Deepak Prasad11 min read
security

Change Alias, Change Password, Delete Entries in Java Keystore

Rename keystore aliases with keytool -changealias, rotate the store password with -storepasswd, change per-key passwords on JKS (not PKCS12), and remove entries with -delete — with real PKCS12 and JKS output from Ubuntu.

Deepak Prasad8 min read
security

Export Certificate from Java Keystore in PEM and DER Format

Export a certificate from a Java keystore with keytool -exportcert: DER binary without -rfc, PEM text with -rfc, verify with keytool -printcert and file, and know when the private key is not included.

Deepak Prasad8 min read
security

List and Inspect Java Keystore Entries: Alias, Expiry, SAN, Fingerprint

Use keytool -list and keytool -list -v to read keystore aliases, entry types, SHA-256 fingerprints, certificate expiry, and Subject Alternative Names on PKCS12 files, plus an awk one-liner to spot certificates nearing …

Deepak Prasad7 min read
security

Convert JKS to PKCS12 and PKCS12 to JKS with keytool

Convert Java JKS keystores to PKCS12 and PKCS12 back to JKS with keytool -importkeystore, understand the proprietary JKS warning, and learn why OpenJDK defaults to PKCS12 since Java 9 (JEP 229).

Deepak Prasad8 min read
security

Import PKCS12/PFX into Java Keystore Using keytool

Import a PKCS12 or PFX bundle into a Java keystore with keytool -importkeystore, use PKCS12 directly as the store type on OpenJDK 9+, merge into an existing keystore, and verify PrivateKeyEntry after import.

Deepak Prasad7 min read
security

Import PEM Certificate and Private Key into Java Keystore

keytool cannot import a PEM private key on its own. Learn why -importcert creates trustedCertEntry instead of PrivateKeyEntry, then wrap cert and key with openssl pkcs12 -export and use keytool -importkeystore for a …

Deepak Prasad8 min read
security

Keystore vs Truststore in Java: Practical Difference with TLS Example

A Java keystore holds your TLS identity (private key and certificate chain). A truststore holds CA certificates you trust when validating peers. Learn PrivateKeyEntry vs trustedCertEntry, cacerts vs custom truststore, …

Deepak Prasad13 min read
security

Use Custom Java Truststore Instead of Editing cacerts

Prefer a custom PKCS12 truststore over editing JDK cacerts: isolate private CA trust per app, survive package upgrades, and set javax.net.ssl.trustStore without touching the global Java CA bundle.

Deepak Prasad9 min read
security

How to Install keytool on Ubuntu

Fix keytool command not found on Ubuntu by installing OpenJDK (default-jdk or openjdk-21-jdk), set JAVA_HOME and PATH, verify with keytool -help, run a PKCS12 smoke test, update through apt, and uninstall cleanly.

Deepak Prasad11 min read
security

OpenSSL vs LibreSSL vs BoringSSL: Which TLS Library Should You Use?

Compare OpenSSL, LibreSSL, and BoringSSL for TLS and cryptography: intended audience, API stability, FIPS, how Linux distributions package each library, and when each is the right choice—with commands to verify what your …

Deepak Prasad13 min read
security

PKI, Certificates, CA, CRL, and OCSP Explained for Beginners

Beginner-friendly PKI tutorial: public keys, X.509 certificates, Certificate Authorities, trust chains, SAN extensions, PEM and PFX formats, CRL vs OCSP revocation, TLS and mTLS handshakes—with diagrams and OpenSSL …

Deepak Prasad11 min read
security

How to Create PKCS12 from CRT and KEY with OpenSSL

Create a PKCS12 (.p12) keystore from CRT and KEY with OpenSSL pkcs12 -export for Java keytool, Oracle JSSE, and IBM apps. Covers alias, chain, self-signed certs, -legacy for older Java, cert-only bundles, and …

Deepak Prasad7 min read
security

How to Create a PFX from CRT and KEY with OpenSSL

Create a PFX or P12 file from CRT and KEY with OpenSSL pkcs12 -export: add intermediate chain with -certfile, set export password with -passout, and use -legacy for Windows IIS. Copy-paste examples with verification …

Deepak Prasad7 min read
security

How to Extract a Private Key from PFX with OpenSSL

Use OpenSSL pkcs12 to extract a private key, certificate, and CA chain from a PFX or P12 file on Linux. Covers password-protected and empty-password PFX, unencrypted PEM for nginx, -legacy for old Windows exports, and …

Deepak Prasad8 min read
security

How to Verify a Certificate Matches a Private Key with OpenSSL

Verify a certificate matches a private key with OpenSSL: compare RSA modulus MD5 hashes, use pkey -pubout for EC and ECDSA, check CSR alignment, and test encrypted keys. Covers nginx mismatch errors and copy-paste …

Deepak Prasad7 min read