user6348718 user6348718 - 3 months ago 29x
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:


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.