Directory for executable files

Stuart McGraw smcg4191 at mtneva.com
Tue May 21 03:27:19 UTC 2019


On 5/20/19 6:05 PM, Phil wrote:
> Thank you for reading this.
> 
> In the past, programmes that needed to be built were downloaded into /usr/local/src and once "configure" and "make" were run an executable file would end up in /usr/local/bin. I don't often need to build a file with "make" and instead many of the programmes that I've downloaded, often to take advantage of the latest version, are downloaded in a zip file that contains an executable file.
> 
> Once extracted the executable file, along with many other files, ends up in ~/Downloads/programme_name but of course that directory is not in $Path. "Application Launcher" takes care of that problem but I think there must be a more technically correct method.
> 
> I do have ~/.local/bin because that's where "pip" puts the executable files. I could link ~/Downloads/programme_name to ~/.local/bin and that would allow me to launch an executable file from the console. $PATH includes ~/.local/bin.
> 
> So, is using the application launch the best method to take care of programmes that are not in the path or is there a more technically correct and neater method?

What I usually do is to move such packages to /opt (often with a symlink for a generic name pointing to a version-specific name) and then create a symlink in /usr/bin (/usr/local/bin would also be fine) that points to the executable(s).

For example, after unpacking, Sublime (code editor) gets moved to /opt/sublime_3207/
   /opt/sublime -> sublime_3207/
   /usr/bin/sublime -> /opt/sublime/sublime_text




More information about the ubuntu-users mailing list