[英]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.