簡體   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