How to Install Maven latest version on Ubuntu Server Example


In the tutorial, we show you how to install Maven in Ubuntu Server.

Related post:
How to install Java in Ubuntu Remote Server – Vutr Hosting VPS Example

Check Java Installation

Firstly, check Java:


Related post if Java is NOT installed ->

How to install Java in Ubuntu Remote Server – Vutr Hosting VPS Example

Install Maven with APT

Updating the package index:

sudo apt update

Install Maven by cmd:

sudo apt install maven

Verify the Maven installation by cmd:

mvn -version


Install Maven Latest Version

The lastest version of Maven when creating the post is 3.6.0. But the Maven package index by APT is just 3.5.4.

So for the lastest version of Maven, we need install Maven from Downloading Apache Maven

– Download Apache Maven ->

– Extract the archive in the /opt directory ->

– Create a symbolic link maven which will point to the Maven installation directory:

-> For upgrade Maven installation, just simply unpack the newer version and change the symlink to point to the latest version.

– Setup Maven Environment Variables:


– Now verification: mvn -version


By grokonez | December 3, 2018.

Related Posts

Got Something To Say:

Your email address will not be published. Required fields are marked *