How Do I Run a Program in a Folder in Linux?
Contents How Do I Run a Program in a Different Directory in Linux? Place You Program in ~/Bin Directory (Which Is a Short for /Home/Yourname/Bin ) and You Will...
Contents
How do I run a program in a different directory in Linux?
Place you program in ~/bin directory (which is a short for /home/yourname/bin ) and you will be able to run your program from any location, because when ~/bin exists bash adds it to the PATH by default (at least on Ubuntu). You will need to create this directory if it doesn’t exist.
Must Read
How do I run a script from a folder in Linux?
To run executable from any directory:
- Make a bin directory under your home directory and mv your executable scripts into it. …
- Move your executable scripts in bin direcoty. …
- Now add it to your path variable. …
- Check if that path is added in path variable. …
- Verify if script is running from any random directory.