How to install Java 11 on Debian 8/9/10, Ubuntu 16/18/20, and CentOS 6/7/8

131

Installation on Debian 8/9/10

To install Java 11 on Debian 8, 9, or 10, execute the commands:

Debian 10

apt-get update
apt-get install default-jdk

Debian 9

apt-get install sudo
echo 'deb http://ftp.debian.org/debian stretch-backports main' | sudo tee /etc/apt/sources.list.d/stretch-backports.list
apt-get update
apt-get install openjdk-11-jdk

For installation on Debian 8, use the universal method.

Installation on Ubuntu 16.04/18.04/20.04

To install Java 11 on Ubuntu 16.04, 18.04, or 20.04, execute the commands:

Ubuntu 18.04, 20.04

apt-get update
apt-get install default-jdk

Ubuntu 16.04

apt-get install software-properties-common
add-apt-repository ppa:linuxuprising/java
apt-get update
apt-get install oracle-java11-installer-local

Installation on CentOS 6/7/8

To install Java 11 on CentOS 6, 7, or 8, execute the commands:

CentOS 6, 7, 8

yum update
yum install java-11-openjdk-devel

We value your privacy

We use cookies and process your IP address to personalize content, detect your location for regional pricing, analyze site traffic, and show relevant ads. We share data with our analytics and advertising partners. Click "Accept All" to consent to all cookies, or "Reject All" to decline non-essential cookies. Some essential cookies will always be used for the site to function. Learn more in our Privacy Policy