How Do I Make a Program Executable from Anywhere in Linux?
Contents How Can I Make a Program Executable from Everywhere Linux? If You Want to Be Able to Execute It from Everywhere as Long as Your Session Remains Open...
Contents
How can I make a program executable from everywhere Linux?
If you want to be able to execute it from everywhere as long as your session remains open, then type export PATH=$PATH:~/Downloads and push enter. This will change the path for your current session, but when you open a new window or close the current one you’ll be back to your default path.
Must Read
How do I run a script from anywhere in Linux?
2 Answers
- Create yourself a directory $HOME/bin . Put all your executable scripts in it (make them executable with chmod +x script if need be††). …
- Add $HOME/bin to your PATH . I put mine at the front: PATH=”$HOME/bin:$PATH , but you could put it at the back if you prefer.
- Update your . profile or .
24 мар. 2015 г.