我有一个使用 jmeter 的脚本。现在,我不想在脚本中给出路径,例如 sh/home/ubuntu/apache-jmeter-3.0/bin/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
。
关于linux - 如何在 .profile 或 .bash_profile 中设置 PATH in ubuntu,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38151964/