user6348718 user6348718 - 1 year ago 145
Bash Question

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/ -n -t fileName.jmx
in the script I just want to give
sh -n -t fileName.jmx
in the script. So, I want to set up the PATH of the
. I didn't understand how to do it. Can some one help.

Path to my jmeter is:

Answer Source

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: -n -t fileName.jmx

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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download