linux equivalent of PATH in Windows [SOLVED]
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
linux equivalent of PATH in Windows [SOLVED]
I have a script (.sh) that works and that I would like to run from any terminal in any directory. In Windows, i would add the directory the script is in to the PATH. What's the equivalent in linux mint?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 2 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: linux equivalent of PATH in Windows
It's actually also called PATH in Linux.
Edit ~/.bashrc and add something like:
Replace '/home/steve/scripts/bin' with wherever the script is located.
You could also just copy the script into /usr/local/bin, which is already in PATH
Edit ~/.bashrc and add something like:
Code: Select all
export PATH="$PATH:/home/steve/scripts/bin"
You could also just copy the script into /usr/local/bin, which is already in PATH
Re: linux equivalent of PATH in Windows [SOLVED]
you guys rock! Thanks! Worked like a champ - I moved the script to /user/local/bin and changed a path in the script so it was absolute and not relative.