Java is a programming language developed by Sun Microsystems. There are lots of applications and websites which require java to run. We will show you how to install Java on Ubuntu 18.04 in this article. Please refer to the below steps to install Java on ubuntu 18.04
- SSH to your server with root user.
- Update your system using the apt-get update command.
apt-get update -y
- Now execute the following command which will install the Java runtime environment which will install JRE from open JDK 11.
sudo apt install default-jre
- Once the installation is completed you can verify it by using the following command. It will show the output as shown in the below image if the installation was successful.