How To Install Java with Apt on Ubuntu 18.04
How To Install Java with Apt on Ubuntu 18.04
If you are looking to install Java on Ubuntu 18.04, then you are in the right place. In this tutorial, we will show you how to install Java with Apt on Ubuntu 18.04.
Step 1: Update the package list
Before installing any package on Ubuntu, it is recommended to update the package list. You can do this by running the following command:
sudo apt update
Step 2: Install Java with Apt
Now that we have updated the package list, we can install Java using Apt. You can install Java by running the following command:
sudo apt install default-jdk
Step 3: Verify the installation
To verify that Java has been installed successfully, you can run the following command:
java -version
If Java is installed, you should see output similar to the following:
openjdk version "11.0.11" 2021-04-20
OpenJDK Runtime Environment (build 11.0.11+9-Ubuntu-0ubuntu2.18.04)
OpenJDK 64-Bit Server VM (build 11.0.11+9-Ubuntu-0ubuntu2.18.04, mixed mode, sharing)
Conclusion
That's it! You now have Java installed on your Ubuntu 18.04 system.
Keywords: Java, Apt, Ubuntu 18.04, installation, tutorial.
Комментарии
Отправить комментарий