Sunday, April 28, 2024
26
rated 0 times [  26] [ 0]  / answers: 1 / hits: 61048  / 2 Years ago, thu, april 28, 2022, 3:25:32

By default some applications install into /usr/local/bin. But if I change user, will that user be able to access this application? I read somewhere here (another question) that I should use /opt. But binaries that by default go into /usr/local/bin? There's no /opt/bin?


More From » package-management

 Answers
1

Usually you should not have to try to install anything by hand. In almost all cases you will find a .deb package. If there isn't one, google for suggestions (like how to install Oracle JDK in Ubuntu). If this is your own software, check out the Ubuntu Packaging Guide for help on how to properly put stuff into Ubuntu.


If you must do it anyway, put the binary in /opt/myapp and link the executable with:


ln -s /opt/myapp/myappbinary /usr/local/bin/myappbinary

If you want to know more on the topic, type man hier in a terminal. The difference between /usr/bin and /usr/local/bin is explained there. In any case, both paths are in the $PATH environment variable. That means any binary you put there will be executable by anyone just by giving the name of the binary (and not the full path). So using the above example you can run your program with myappbinary instead of having to give the full path /opt/myapp/myappbinary.


[#43086] Friday, April 29, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
itchlos

Total Points: 486
Total Questions: 115
Total Answers: 110

Location: Macau
Member since Fri, Apr 28, 2023
1 Year ago
;