繁体   English   中英

如何在ubuntu中的.profile或.bash_profile中设置PATH

[英]How to set the PATH in .profile or .bash_profile in ubuntu

我有一个使用jmeter的脚本。 现在,不要像脚本中的sh /home/ubuntu/apache-jmeter-3.0/bin/jmeter.sh -n -t fileName.jmx那样在脚本中给出路径,而只是想给sh jmeter.sh -n -t fileName.jmx脚本中的sh jmeter.sh -n -t fileName.jmx 所以,我想在ubuntu设置jmeter的PATH。 我不明白该怎么做。 有人可以提供帮助。

我的jmeter的路径是: /home/ubuntu/apache-jmeter-3.0

将目录/home/ubuntu/apache-jmeter-3.0/bin添加到您的路径:

export PATH="$PATH":/home/ubuntu/apache-jmeter-3.0/bin

然后你可以直接使用它:

jmeter.sh -n -t fileName.jmx

要使其永久化,请将新的PATH声明添加到~/.bashrc

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM