Ubuntu 20.04 - install Apache Maven (mvn command)

9 points
Created by:

In this short article we would like to show how to install Apache Maven (mvn command) on Ubuntu 20.04 using default package tool (apt command).

Quick solution (run following commands):

sudo apt update
sudo apt install maven

Note: maven requires java, so check if java is installed. 

Testing maven installation example

To check if maven is installed proper way, use following command:

mvn -v


Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 14.0.1, vendor: Private Build, runtime: /usr/lib/jvm/java-14-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-48-generic", arch: "amd64", family: "unix"
Hey 👋
Would you like to know what we do?
  • Dirask is online IT community for professionals and hobbyist to share their knowledge and help each other in extraordinary easy way.
  • We welcome everyone
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.