Open links in new tab
  1. You can install Java on Linux using package managers for your distribution or by manually installing from downloaded files. The method you choose depends on whether you need the JDK for development or just the JRE for running applications.

    Ubuntu/Debian (Using Package Manager)

    1. Open a terminal and update the package list: sudo apt update

    2. Install OpenJDK 11: sudo apt install openjdk-11-jdk

    3. For Java 8, run: sudo apt install openjdk-8-jdk

    4. Verify installation: java -version

    CentOS/Fedora (Using Package Manager)

    1. Open a terminal and update the system: sudo yum update

    2. Install OpenJDK 11: sudo yum install java-11-openjdk-devel

    3. For Java 8, run: sudo yum install java-1.8.0-openjdk-devel

    4. Verify installation: java -version

    Manual Installation (Any Linux)

    1. Download the JDK .tar.gz file from the official Oracle or OpenJDK site.

    2. Move the file to your desired installation directory.

    3. Extract the archive: tar -xzvf jdk-<version>.tar.gz

    4. Move the extracted folder to /usr/local: sudo mv jdk-<version> /usr/local/

    5. Edit ~/.bashrc to set environment variables: export JAVA_HOME=/usr/local/jdk-<version> export PATH=$PATH:$JAVA_HOME/bin

    6. Apply changes: source ~/.bashrc

    7. Verify installation: java -version

  1. How to Install Java on Linux - linuxvox.com

    Jan 16, 2026 · Installing Java on a Linux system is a fundamental step for developers, system administrators, and anyone looking to run Java-based applications. This blog will provide a detailed …

  2. Installation of the JDK on Linux Platforms - Oracle Help Center

    This topic describes the installation procedures of the JDK on the Linux platform, along with the system requirements.

  3. Linux 64-bit installation instructions for Java

    Learn how to download and install the Java Runtime Environment (JRE) for 64-bit Linux using an archive binary file (.tar.gz). Follow the steps for Oracle Enterprise Linux, Oracle Linux, Red Hat Linux, SLES, …

  4. How to install Java on Linux - Opensource.com

    Nov 20, 2019 · Learn the different ways to install Java on Linux, whether you need a JRE, a JDK, or a JVM. Compare OpenJDK, IcedTea, and OracleJDK, and find out …

  5. How to Install OpenJDK in Linux - GeeksforGeeks

    Jul 23, 2025 · This guide will show you step-by-step instructions on how to install OpenJDK on a Linux system, verify the installation, and set it up for your projects. …

  6. Install Java on Linux: JDK vs JRE Guide - LinuxConfig.org

    Sep 21, 2025 · In this tutorial, we will go over the step by step instructions to install Java on all major linux distros. This will include all the relevant versions of Java …

  7. 4 Ways to Install Java on Linux - wikiHow

    6 days ago · This wikiHow teaches you how to install the latest version of the Java Runtime Environment (JRE) on a computer running Linux. Open the Java for …

  8. A Comprehensive Guide on Installing Java for Linux

    Mar 24, 2026 · This blog post will provide you with a detailed guide on how to install Java on Linux, covering different installation methods, usage, common practices, and best practices.

  9. How to Install Java with Apt on Ubuntu (JRE & JDK)

    Feb 2, 2026 · Learn how to install Java (JRE & JDK) on Ubuntu using apt. Step-by-step guide to setting up Java, verifying installation, and managing multiple …

  10. Install Java on Linux - programguru.org

    Learn how to install Java on any Linux distribution using simple terminal commands. This step-by-step guide covers both OpenJDK and Oracle JDK installations with examples and output explanations.

  11. People also ask
    Loading
    Unable to load answer