2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Install Maven into Ubuntu(WSL2)

Last updated at Posted at 2021-07-04

In this article, I write down how to intall Maven into Ubuntu(WSL2). I don't explain what Maven is. If you want to know it, please read Maven – Welcome to Apache Maven page.

At the fist, you need to update your Ubuntu repogitory to the latest using the following command:

[Ubuntu: ~]$sudo apt update

Then, upgrade Ubuntu:

[Ubuntu: ~]$sudo apt upgrade

Check that OS is upgraded/updated as follows:

[Ubuntu: ~]$cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.2 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.2 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal

Install maven:

[Ubuntu: ~]$sudo apt install maven
Reading package lists... Done
Building dependency tree
Reading state information... Done
maven is already the newest version (3.6.3-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Check maven version installed into your enviroment:

[Ubuntu: ~]$mvn --version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.11, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en, platform encoding: UTF-8
OS name: "linux", version: "5.4.72-microsoft-standard-wsl2", arch: "amd64", family: "unix"

That's it!

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?