Press "Enter" to skip to content

Ubuntu16.04 配置环境变量

临时设置

export M2_HOME=/etc/mvn/apache-maven-3.6.1
export PATH={M2_HOME}/bin:{PATH}

当前用户的全局设置

vim ~/.profile

添加行:

export M2_HOME=/etc/mvn/apache-maven-3.6.1
export PATH={M2_HOME}/bin:{PATH}

使生效

source .profile

所有用户的全局设置

vim /etc/profile 

在里面加入:

export M2_HOME=/etc/mvn/apache-maven-3.6.1
export PATH={M2_HOME}/bin:{PATH} 

使生效

source /etc/profil

One Comment

Leave a Reply

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