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