Directory for executable files
Ralf Mardorf
silver.bullet at zoho.com
Tue May 21 02:32:01 UTC 2019
On Tue, 21 May 2019 10:05:03 +1000, Phil wrote:
>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.
Hi,
unzip extracts the "zipball" inside the directory were the download is
located. I would download to /tmp in the first place instead of
~/Download, then unzip in /tmp. If needed make I would make it
executable, but usually just changing the owner to root is what should
be done and then move it to a wanted directory, such as /usr/local/bin.
You have several choices, you could
sudo chown root:root ~/Downloads/programme_name
sudo mv -i ~/Downloads/programme_name /usr/local/bin/
>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.
mv -i ~/Downloads/programme_name ~/.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?
You could globally add /home/your_user/Downloads/ to PATH by
editing /etc/environment.
Exporting it locally by adding
export PATH="${PATH}:/home/your_user/Downloads/
to ~/.bashrc, could cause issues if systemd or dbus are involved.
Regards,
Ralf
More information about the ubuntu-users
mailing list