Ubuntu, which is a Debian derivative, follows a very precise structure when installing packages. In other words, all software installed through the packaging tools, such as apt-get or synaptic, will put the stuff in the same locations. If you become familiar with these locations, you'll always know where to find your stuff.
As a short cut, you can always open a tool like synaptic, find the installed package, and inspect the "properties". Under properties, you'll see a list of all installed files. Again, you can expect these to always follow the Debian/Ubuntu conventions; these are highly ordered Linux distributions. IN short, binaries will be in /usr/bin, or some other location on your path ( try 'echo $PATH' on the command line to see the possible locations ). Configuration is always in a subdirectory of /etc. And the "home" is typically in /usr/lib or /usr/share.
Here is a bash script for newer Maven copy and paste it...
# @author Yucca Nel
#!/bin/sh
#This installs maven2 & a default JDK
sudo apt-get install maven2;
#Makes the /usr/lib/mvn in case...
sudo mkdir -p /usr/lib/mvn;
#Clean out /tmp...
sudo rm -rf /tmp/*;
cd /tmp;
#Update this line to reflect newer versions of maven
wget http://mirrors.powertech.no/www.apache.org/dist//maven/binaries/apache-maven-3.0.3-bin.tar.gz;
tar -xvf ./*gz;
#Move it to where it to logical location
sudo mv /tmp/apache-maven-3.* /usr/lib/mvn/;
#Link the new Maven to the bin... (update for higher/newer version)...
sudo ln -s /usr/lib/mvn/apache-maven-3.0.3/bin/mvn /usr/bin/mvn;
#test
mvn -version;
exit 0;
I would like to add that .m2 folder a lot of people say it is in your home folder. It is right. But if use maven from ready to go IDE like Spring STS then your .m2 folder is placed in root folder
To access root folder you need to switch to super user account