I’ve been using Linux (specifically Ubuntu) for quite some time now, I’ve been trying to migrate to Linux from windows. One of the first thing I’ve encountered is adding an environment variable. Compared to windows, its very similar, only that you have multiple ways to do it. One way I find to be the easiest is by adding it to /etc/environment file. So here’s how to do it.
/etc/environmentas root in GEdit (or any text editor you have)
sudo gedit /etc/environment
Add the following lines (remember to change the version to what you are also using).
Save it and log-off or restart you machine, that’s it!
You can also add other variables like your
MAVEN_HOME or anything you want.