Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • Build your AI Agent
    • GfG 160
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Contests
    • Accenture Hackathon (Ending Soon!)
    • GfG Weekly [Rated Contest]
    • Job-A-Thon Hiring Challenge
    • All Contests and Events
  • Java Arrays
  • Java Strings
  • Java OOPs
  • Java Collection
  • Java 8 Tutorial
  • Java Multithreading
  • Java Exception Handling
  • Java Programs
  • Java Project
  • Java Collections Interview
  • Java Interview Questions
  • Java MCQs
  • Spring
  • Spring MVC
  • Spring Boot
  • Hibernate
Open In App
Next Article:
How to Install Jekyll on Linux?
Next article icon

How to Install JDK in Linux?

Last Updated : 22 May, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Java is a very popular general-purpose programming language, which is very close to flow Oop's theory and can run independently on any platform, but its run time environment is dependent on the platform the JVM (Java Virtual Machine) is also known as. Which first interprets Java file byte code and byte code into machine language. Here we are going to install JDK in the Debian-based Ubuntu operating system.

Step-by-Step Installation:

Step 1: Open your browser and navigate to this link.

How to Install JDK in Linux?

Step 2: Scroll down and click on the JDK download link.

How to Install JDK in Linux?

Step 3: Then choose the compatible file.

How to Install JDK in Linux?

After clicking on the link they show the popup to confirm their terms and conditions to allow it and click on the download button.

How to Install JDK in Linux?

Checkmark and click download.

How to Install JDK in Linux?

Step 4: After download to navigate to your download folder, and open the terminal and go download folder.

How to Install JDK in Linux?

Step 5: Type command.

sudo dpkg -i package_name

After type command press enter.

How to Install JDK in Linux?

This process will take little time.

Step 6: After doing to above process the next step to update the paths and alternatives.

sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk-15.0.2/bin/java 1
How to Install JDK in Linux?

Output:

For alternatives:

sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk-15.0.2/bin/javac 1
How to Install JDK in Linux?

Output:

Step 7: Finally, The Java JDK is installed successfully.

Check Java properly install or not.

And check Javac is properly installed or not.

How to Install JDK in Linux?

Next Article
How to Install Jekyll on Linux?
author
mrsuryapratap
Improve
Article Tags :
  • Java
  • Linux-Unix
  • How To
  • Installation Guide
  • how-to-install
Practice Tags :
  • Java

Similar Reads

  • How to Install Scala in Linux?
    Prerequisite: Introduction to Scala Before, we start with the process of Installing Scala on our System. We must have first-hand knowledge of What the Scala Language is and what it actually does? Scala is a general-purpose, high-level, multi-paradigm programming language. It is a pure object-oriente
    3 min read
  • How to Install Xampp in Linux
    XAMPP is a popular and free open-source platform primarily used for PHP development. It comes bundled with essential tools like Apache Web Server, MySQL (MariaDB), PHP, Perl, and more, making it a one-stop solution for web development. Installing and setting up XAMPP is streamlined, and the package
    6 min read
  • How to Install Jekyll on Linux?
    Jekyll is software used for creating websites. It can create websites more dynamically. Jekyll is useful nowadays. It can convert simply written text files into website documentation. It is simple to use. There is no database required for using Jekyll. It is very easy to use. Jekyll is platform-inde
    2 min read
  • How to Install Java JDK9 on Linux?
    As we all know Java is widely used in tech industries, with around 4 billion devices currently using java. This Java installation is going to be very easy and beginner-friendly. In this article, we are going to see a step-by-step guide on how you can install java on your Linux machine. Step-By-Step
    4 min read
  • How to Install OpenJDK in Linux
    If you have started Java learning, you must have the Java Development Kit (JDK) installed on your system. OpenJDK is a free and open-source version of Java that provides everything you need to develop and run Java applications. It’s a popular choice for developers because it’s easy to install and wo
    4 min read
  • How to Install VisualVM in Linux
    When operating on a Java Virtual Machine, the sophisticated tool VisualVM offers a visual interface for viewing in-depth details about local and remote Java applications (JVM). To see the program within the JVM, it makes use of and integrates some of the command-line tools that the JDK offers; this
    3 min read
  • How to Install Sqlninja in Kali Linux
    SQL Injection is one of the most severe attacks on web applications that exploit the SQL Database and provide unauthorized access to the Database. This attack can be done through different techniques like Manual and Automated. The manual approach requires more effort as all the steps are to be carri
    6 min read
  • How to Install Tomahawk in Linux?
    Tomahawk is open-source software. It is not usually used software that developers used. It is a software made for the use of only musical purposes. Tomahawk is available in both Linux & Windows machines. It is capable to work with both Linux & Windows operating systems at a time. It is widel
    5 min read
  • How to Install Bin Files in Linux
    Bin files in Linux are the binary executable files used for software installation or distribution. Installing bin files involves granting executable permissions, running the bin file, and verifying the installation, ensuring that the software is correctly installed and ready for use on the Linux sys
    3 min read
  • How to Install Kotlin on Linux?
    Kotlin is a programming language introduced by JetBrains in 2011, the official designer of the most intelligent Java IDE, named Intellij IDEA. This is a strongly statically typed general-purpose programming language that runs on JVM. In 2017, Kotlin is sponsored by Google, announced as one of the of
    2 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences