user6348718
user6348718

Reputation: 1395

How to set the PATH in .profile or .bash_profile in ubuntu

I have a script which uses jmeter. Now, instead of giving the path in the script like sh /home/ubuntu/apache-jmeter-3.0/bin/jmeter.sh -n -t fileName.jmx in the script I just want to give sh jmeter.sh -n -t fileName.jmx in the script. So, I want to set up the PATH of the jmeter in ubuntu. I didn't understand how to do it. Can some one help.

Path to my jmeter is: /home/ubuntu/apache-jmeter-3.0

Upvotes: 3

Views: 10669

Answers (1)

heemayl
heemayl

Reputation: 41987

Add the directory /home/ubuntu/apache-jmeter-3.0/bin to your path:

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

Then you can use it directly:

jmeter.sh -n -t fileName.jmx

To make it permanent, add the new PATH declaration to your ~/.bashrc.

Upvotes: 3

Related Questions